You are currently browsing all posts tagged with Powerbuilder

PowerBuilder – Next Key Service

Posted on January 11, 2011 at 8:20 pm in

As an extension of the next key stored procedure article, here is a pretty easy to implement a next surrogate key service to use with the PFC. If you don’t use the PFC it is still fairly easy to use with some modification. You can use this service anytime you want to get a sequential…

PowerBuilder – Next Key Service - the full story »

PowerBuilder – Move Frequently Chosen Items to Top of DropDownDataWindow

Posted on January 7, 2011 at 8:20 pm in

I’m looking at an application which basically records demographic information for a population. One of the fields listed is ‘primary language’ which has a typical dropdowndatawindow interface. I look at the options and BAM!, a huge alphabetical list (including Esperanto!). Now this application is generally used in the US so my guess is at least…

PowerBuilder – Move Frequently Chosen Items to Top of DropDownDataWindow - the full story »

PowerBuilder – Locating Windows folders

Posted on December 29, 2010 at 8:20 pm in

Here is an easy way to find the paths to the various Windows folders. oleobject lole_wshell lole_wshell = create oleobject lole_wshell.connecttonewobject( "wscript.shell") is_mydocspath = lole_wshell.SpecialFolders("MyDocuments") IF IsValid(lole_wshell) THEN Destroy lole_wshell /* other folders: AllUsersDesktop AllUsersStartMenu AllUsersPrograms AllUsersStartup Desktop Favorites Fonts MyDocuments NetHood PrintHood Programs Recent SendTo StartMenu Startup Templates */

PowerBuilder – Locating Windows folders - the full story »

PowerBuilder – Prevent Individual Column Resizing in Grid DW

Posted on December 20, 2010 at 8:20 pm in

Many applications I’ve worked on have grid datawindows that include columns which display graphics to indicate some sort of common functionality such as code inquiry, row selection indicator, etc. Generally you set the ‘display as bitmap’ property on the column and go from there. The problem with these columns, however, is if the user resizes…

PowerBuilder – Prevent Individual Column Resizing in Grid DW - the full story »

PowerBuilder – Get Color Value of Pixel under Pointer

Posted on December 17, 2010 at 8:20 pm in

Here is a sample application which will give you the color value of the pixel the user clicked on on a picture control (this can be used for any object inherited from a dragobject). To see the list of draggable controls, open the Browser. All the objects in the hierarchy below dragobject are draggable. This…

PowerBuilder – Get Color Value of Pixel under Pointer - the full story »

PowerBuilder – Have Window Stay on Top

Posted on December 16, 2010 at 8:20 pm in

One common application technique is to have any notification windows stay on top of all others, even if subsequent windows are opened on top of them (and the notification window loses focus). This can easily be achieved via an external API call: SetWindowPos. From the MSDN: “Changes the size, position, and Z order of a…

PowerBuilder – Have Window Stay on Top - the full story »

PowerBuilder – Application Icon in the System Tray

Posted on December 14, 2010 at 8:20 pm in

One challenge for Powerbuilder developers today is the lack of current information/programming tips relating to more current (10 and above) versions. This also applies to Windows versions as well. There are a variety of different solutions to having an application icon in the System Tray but almost without exception they relate to Windows 95/98 primarily.…

PowerBuilder – Application Icon in the System Tray - the full story »

PowerBuilder – Calling Methods on Separate Windows

Posted on December 3, 2010 at 8:20 pm in

If you need to trigger and event or call a function on another window within an application, here are two solutions. In you have an MDI application you need to get a reference to the sheet. The PFC has a method to get the sheets of a certain class called ‘of_getsheetsbyclass’. You call it and…

PowerBuilder – Calling Methods on Separate Windows - the full story »

PowerBuilder – Dragging Files onto the Application

Posted on November 30, 2010 at 8:22 pm in

Many applications I’ve worked on have had internal drag/drop capabilities. By ‘internal’ I mean you can drag items from one place to another from within the application itself. Now what if you want to drag files from an explorer window into your application and perform some processing? This functionality is not as common. The solution…

PowerBuilder – Dragging Files onto the Application - the full story »

PowerBuilder – Formatting and Validating Date/Time entries in a Datawindow

Posted on November 10, 2010 at 8:20 pm in

Using an editmask on a datawindow column to format a user’s input is pretty common practice for most applications. Done right it leads to a better user experience (no extra formatting characters to type) and can be visually appealing (all phone numbers formatted the same way for example). One really annoying behavior of an editmask…

PowerBuilder – Formatting and Validating Date/Time entries in a Datawindow - the full story »

Top