You are currently browsing the Programming category

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 »

PowerBuilder – Datawindow Filter on a datetime column

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

A question came in on the TekTips Powerbuilder forum regarding filtering on a datetime column in a datawindow. Basically the problem was a ‘type mismatch’ error when trying to filter this type of column. This is how the author was setting the filter: <code> ls_filter = "ls_column_name= '11/10/2010 12:30:00'" or ls_filter = "ls_column_name= '" +…

PowerBuilder – Datawindow Filter on a datetime column - the full story »

PowerBuilder – Number of Characters Remaining in a String Column

Posted on October 21, 2010 at 8:20 pm in

A system I developed a while back was essentially a front end for a COBOL zSeries application (System 390 for you old timers). As such I had to make sure my data played nice with the VSAM files and the functionality my app was essentaily replacing. In one instance the users had the ability to…

PowerBuilder – Number of Characters Remaining in a String Column - the full story »

PowerBuilder – Item counter for datawindow entries

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

This is a PFC based component I build for an application used to create purchasing requisitions. The main datawindow was used to enter new ‘documents’ and was too large to allow for more than one row to be visible at a time. Rather than use a common ‘vcr’ type control I created one which shows…

PowerBuilder – Item counter for datawindow entries - the full story »

PowerBuilder – Window Object information service

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

Here is an easy to implement service geared towards developers who are working on complex, many layered applications. In its basic form it shows the current window object, which pbl it is located in, all the various ancestors of the window, their pbl locations, all datawindows and datawindow objects on the window, and the sql…

PowerBuilder – Window Object information service - the full story »

Top