Windows API Calls for Powerbuilder 5.0

¹®Á¦

Mouse_Event( )

ÇØ°á

This function has the ability of moving the mouse pointer, activating the mouse buttons, and doing anything that the user can do with the mouse. The sample script will move the mouse 80 pixels left and 50 pixels up. The structure is populated by the mouses previous position. There is no Powerbuilder equivalent.

Global External Function:
SUBROUTINE Mouse_Event(ulong dwflag,ulong dx,ulong dy,ulong cbutton,ulong dwextra) &
                                     LIBRARY "User32.dll"

Structure: (Mousepos)
long xpos, long ypos

Script:
int l_loop, lx, ly, lflag
mousepos mouseloc
lx = mouseloc.xpos
ly = mouseloc.ypos
lflag = 1       // 1 = do nothing, 2 = L-button down, 8 = Create shortcut ,
                // 25 = R-button down
mouse_event(lflag,-80,-50,0,0)

 

ÂüÁ¶