Click or drag to resize

CapsLock Function

X#
Returns the current mode of the CAPS Lock key or sets the CAPS Lock key mode on or off.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax
 FUNCTION CapsLock() AS LOGIC
Request Example View Source

Return Value

Type: Logic
A logical value is returned corresponding to the CAPS Lock setting before Capslock(.T.) or Capslock(.F.) is issued.
Remarks
Issuing Capslock( ) with no argument returns true (.T.) if CAPS Lock is on, or false (.F.) if CAPS Lock is off.
Examples
X#
 1glOldLock = Capslock( )     // Save original setting
 2Capslock(.T.)     // Turn CAPS Lock on
 3*** Perform any number of statements ***
 4Capslock(glOldLock)  // Return to original setting
 5*** or, toggle CapsLock to the opposite value and back ***
 6Capslock(!Capslock( ))
 7WAIT
 8Capslock(!Capslock( ))
 9WAIT
10Capslock(glOldLock)  // Return to original setting
See Also