Windows API Calls for Powerbuilder 5.0

¹®Á¦

GetKeyState( )

ÇØ°á

This function returns the present state of a specific key on the keyboard based on that key’s ASCII representation. A zero value represents that the key is not pressed. There is no Powerbuilder equivalent.

Global External Function:
Function int GetKeyState(integer VirtualKeycode) Library "User32.dll"

Script:
int rtn
rtn = GetKeyState(65) // 65 = A
if rtn = 0 then
        MessageBox("Key State","Letter is not pressed!")
else
        MessageBox("Key State","Letter is pressed!")
end if

 

ÂüÁ¶