Click or drag to resize

CapsLock Function (Logic)

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.19
Syntax
 FUNCTION CapsLock(
	lSetOn AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

lSetOn
Type: Logic
Include to turn the CAPS Lock key on or off. Capslock(.T.) turns CAPS Lock on and Capslock(.F.) turns CAPS Lock off.

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