NumLock Function (Logic) | |
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(
lSetOn AS LOGIC
) AS LOGIC
public static bool NumLock(
bool lSetOn
)
Request Example
View SourceParameters
- lSetOn
- Type: Logic
Turns the Num Lock key on or off. If lSetOn is true (.T.), the Num Lock key is turned on; if lSetOn is false (.F.),
the Num Lock key is turned off.
Return 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