GetWindowKeyState

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > UI (User Interface) > Keyboard >

GetWindowKeyState

 

Description

 

Determines whether a key is up or down at the time the function is executed.

 

Syntax

 

n = GetWindowKeyState(hWnd, vKey)

 

Returns

 

Number: %TRUE or %FALSE.

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the window to check if currently active

vKey

Number

No

Specifies one of then 256 possible virtual-key codes. For more information, see Virtual-Key Codes

 

Remarks

 

Use GetWindowKeyState with vKey equal to -1 to reset keys flags.

 

Function check if hWnd handle is the active window. If not, function will return %FALSE even if the requested key is pressed.

 

Restrictions

 

See also

 

Examples