PowerBuilder ‘Gotcha’ – pbm_dwnmousemove

Posted on Tuesday, June 22nd, 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 separate descendant event mapped to the same event ID and it will work fine.  Once code is added to the ancestor, the descendant code will no longer work.

Another tip with this event is to keep track of the row/column the mouse pointer is on (via an instance variable) so that your code is not constantly being fired.   Pbm_dwnmousemove is continually being triggered when the pointer is over the datawindow and, unless you need this type of feedback, you will reduce CPU usage by jumping over your code if the pointer is just sitting there.

Top