NumLock Function | |
Returns the current mode of the Num Lock key or sets the mode of the Num Lock key on or off.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION NumLock() AS LOGIC
public static bool NumLock()
Request Example
View SourceReturn Value
Type:
Logic
NumLock( ) returns a logical value corresponding to the Num Lock key setting before NumLock(.T.)
or NumLock(.F.) is issued.
Remarks
NumLock( ) returns true (.T.) if the Num Lock key is on (pressing a key on the numeric keypad returns a number), or false (.F.)
if Num Lock is off (pressing a key on the numeric keypad moves the cursor).
Examples 1gcOldLock = NumLock( )
2WAIT 'Press a key to turn Num Lock on'
3= NumLock(.T.)
4WAIT 'Press a key to turn Num Lock off'
5= NumLock(!NumLock( ))
6WAIT 'Press a key to restore original Num Lock setting'
7= NumLock(gcOldLock)
See Also