CapsLock Function (Logic) | |
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(
lSetOn AS LOGIC
) AS LOGIC
public static bool CapsLock(
bool lSetOn
)
Request Example
View SourceParameters
- 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 1glOldLock = Capslock( )
2Capslock(.T.)
3*** Perform any number of statements ***
4Capslock(glOldLock)
5*** or, toggle CapsLock to the opposite value and back ***
6Capslock(!Capslock( ))
7WAIT
8Capslock(!Capslock( ))
9WAIT
10Capslock(glOldLock)
See Also