You are currently browsing all posts tagged with Powerbuilder

PowerBuilder – Timing Out a Windows Session

Posted on June 12, 2012 at 6:25 pm in

There are a variety of techniques to locking or timing out an application after a certain amount of inactivity. With earlier versions of Windows (XP and prior) a common approach was to invoke the screen saver via a Send command. send(handle(This),274,61760,0) This doesn’t work with Windows 7 (or Vista). Try the following: integer li_rc OleObject…

PowerBuilder – Timing Out a Windows Session - the full story »

PowerBuilder – Using .Net Visual Controls in PB Classic Applications

Posted on June 5, 2012 at 5:27 pm in

This article describes the techniques and code used during my presentations at the Carolina Code Camp 2012 and at the May 2012 meeting of the North Carolina PowerBuilder User Group. The techniques described here utilize Visual Basic .Net (coded in Visual Studio 2010) with the Interop Forms Toolkit available from Microsoft. The Interop Forms Toolkit…

PowerBuilder – Using .Net Visual Controls in PB Classic Applications - the full story »

PowerBuilder – Resizing a Response Window or User Object

Posted on May 23, 2012 at 5:16 pm in

Here is a technique you can use to resize a response window or userobject as needed. It makes use of the GetWindowLong and SetWindowLong Windows API methods. The oldest reference I found to this is from Eric Aling back in 2000. In a nutshell, you are changing the border around the object to one which…

PowerBuilder – Resizing a Response Window or User Object - the full story »

PowerBuilder – Discarding Rows with Find

Posted on May 10, 2012 at 5:37 pm in

It’s a fairly common practice to report on a set of data derived from a larger group of rows. There are many techniques to do this in code and with the methods available with datawindows/datastores. One typical approach is to use the Filter method. The problem with this is it requires another trip to the…

PowerBuilder – Discarding Rows with Find - the full story »

PowerBuilder – Determining if Controls Overlap

Posted on May 2, 2012 at 5:32 pm in

I had a situation where I needed to know if the user is clicking on a control which is underneath a rectangle on a datawindow. In this case the interior of the rectangle was transparent. ls_name = dwo.name IF (left(ls_name, 2) = 'r_') THEN // my standard rectangle naming convention ls_objects = this.Describe( 'DataWindow.Objects') ls_objects…

PowerBuilder – Determining if Controls Overlap - the full story »

PowerBuilder ‘Gotcha’ – Enabled Property on Controls

Posted on April 24, 2012 at 5:28 pm in

I’m writing a generic datawindow processor service to look at the controls on any given datawindow.  I’m using the Getobjectatpointer method to give me the name of the current control (dwo.Name can be used as well) but I can’t get anything for a single control.  Hmmmm…. To make things more interesting it’s a PB generated…

PowerBuilder ‘Gotcha’ – Enabled Property on Controls - the full story »

100 Days of PowerBuilder – Day 5 – Building up the Application Structure

Posted on April 3, 2012 at 4:12 pm in

This is part of my project ‘100 Days of PowerBuilder’ which is a series of discussions focused on basic PowerBuilder development. Note: This article is written with examples created in PowerBuilder version 12.5. Most steps/examples will be identical with any version going back to 9. So lets get back to work on our sample application…

100 Days of PowerBuilder – Day 5 – Building up the Application Structure - the full story »

Comment on 100 Days of PowerBuilder – Day 5 – Building up the Application Structure »

PowerBuilder – SQL Native Client and DisableBind

Posted on March 19, 2012 at 5:51 pm in

Okay so you are upgrading your application, perhaps using the latest version of PowerBuilder (12.5) and SQL Server (2008 R2), and decide to use the SQL Native Client (SNC) to take advantage of new features in the database. Now like many organizations which use Microsoft SQL Server, you may have gone to OLE DB in…

PowerBuilder – SQL Native Client and DisableBind - the full story »

100 Days of Powerbuilder – Day 4: A Look at the IDE

Posted on February 29, 2012 at 5:58 pm in

This is part of my project ‘100 Days of PowerBuilder’ which is a series of discussions focused on basic PowerBuilder development. Note: This article is written with examples created in PowerBuilder version 12.5. Most steps/examples will be identical with any version going back to 9. Mastering the PowerBuilder Integrated Development Environment (IDE) is the key…

100 Days of Powerbuilder – Day 4: A Look at the IDE - the full story »

Comment on 100 Days of Powerbuilder – Day 4: A Look at the IDE »

PowerBuilder – Fontheight method in Expressions

Posted on February 29, 2012 at 2:29 am in

An enhancement was put into PB12.1 dealing with determining the height of a datawindow column based on its font setting. It’s called Fontheight and takes a string parameter. Unfortunately there does not appear to be any documentation on it in the PB help files (I’m looking in PB12.5). You can see a reference to it…

PowerBuilder – Fontheight method in Expressions - the full story »

Top