You are currently browsing all posts tagged with Powerbuilder

Frogpond – A Child’s Game

Posted on June 22, 2010 at 8:20 pm in

I created this simple game in PowerBuilder as an intellectual exercise as well as to give to my kids.  This first version is very basic – you move the frog around to eat the flies. I plan on enhancing it as time permits. Instructions are included in a text file included in the Zip archive.…

Frogpond – A Child’s Game - the full story »

PowerBuilder ‘Gotcha’ – pbm_dwnmousemove

Posted on June 22, 2010 at 8:20 pm in

If you are using ancestry in your application (and who doesn’t unless it’s really, really, really simple) verify that there isn’t an event mapped to pbm_dwnmousemove (or any other event ID for that matter).  If there is an ancestor event mapped to this and it has no code you will be able to create a…

PowerBuilder ‘Gotcha’ – pbm_dwnmousemove - the full story »

PowerBuilder – Lookup the Display value of a DDDW column

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

It’s a pretty typical situation where you want to know the value displayed in a dropdown datawindow even though behind the scenes only the ID is saved.  Here is a technique you can use to look up the value in any row in the datawindow. ls_describe = “Evaluate(‘LookUpDisplay(part_id)’, ” + string(ll_found) + “)”//ll_found is the…

PowerBuilder – Lookup the Display value of a DDDW column - the full story »

Comment on PowerBuilder – Lookup the Display value of a DDDW column »

PowerBuilder – Change Background of Modified Columns in Datawindow

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

Okay so you have a datawindow with a bunch of rows which can be edited (a grid datawindow is a good choice).  So when the user pulls up the data set and proceeds to change values in a variety of columns and a variety of rows you want to indicate to him that the specific…

PowerBuilder – Change Background of Modified Columns in Datawindow - the full story »

PowerBuilder – Simple ‘Windows Standard’ Row Selection

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

Allowing for ‘Windows Standard’ muli row selection is pretty straight forward.  By ‘Windows Standard’ I mean you can select a range by clicking on a row, holding the shift key and clicking on a second row to select all the rows between the two or by holding down the control key and clicking you can…

PowerBuilder – Simple ‘Windows Standard’ Row Selection - the full story »

PowerBuilder – Watch expressions in Debug

Posted on April 13, 2010 at 8:20 pm in

There is an easy way to see the contents of a datawindow/datastore while in debug mode – through the use of watch expressions.  Once you are stopped at a breakpoint, say after a retrieve, insert the following watch expression:dwname.saveas(“c:\temp\dwname.xls”,xls!,true)The watch window should show a “1” indicating the successful execution of the expression.  Open up the…

PowerBuilder – Watch expressions in Debug - the full story »

Powerbuilder – Evaluating Arithmetic Expressions

Posted on March 11, 2010 at 8:22 pm in

Below is a function which allows the user to enter an arithmetic expression and then evaluate it and return the result.  This will work for addition (+), subtraction(-), multiplication(*), division(/), and exponentiation(^).   You can also enter parenthesis to change the order of precedence if needed.  You would call this from where ever you like to…

Powerbuilder – Evaluating Arithmetic Expressions - the full story »

PowerBuilder – Populate a dropdownlistbox from a SQL statement

Posted on March 11, 2010 at 8:20 pm in

Here is a method to populate a dropdownlistbox control with values from a sql statement.  Since it is based on a datastore you can easily apply filters, sorts, etc. prior to populating the dropdownlistbox with values.  The code assumes the first column in the SQL is going to be used to populate the dropdownlistbox .…

PowerBuilder – Populate a dropdownlistbox from a SQL statement - the full story »

PowerBuilder – ‘Smart’ Crosstab Datawindow

Posted on March 4, 2010 at 8:20 pm in

I had a question from a co-worker regarding a functionality request from a user. Basically they wanted a datawindow to display information for vendors (basic stuff like name, amt 1, amt 2, amt 3, etc.) for a specific set of amount columns. Each line represents one vendor and the various amounts (if any) with a…

PowerBuilder – ‘Smart’ Crosstab Datawindow - the full story »

PowerBuilder – OLE with Facsys to Fax a Document

Posted on October 2, 2009 at 8:23 pm in

Here is a old post I put on Tek-Tips.com way back in 2001. I have just implemented an OLE faxing solution in my PB7 app using Facsys. This code creates the session, addresses the fax message, then attaches a previously created MSWord document to the fax. lole_facsys = Create OLEObject li_rc = lole_facsys.ConnectToNewObject("facsys.faxsession") //Check for…

PowerBuilder – OLE with Facsys to Fax a Document - the full story »

Top