Keyboard.CapsLock Eigenschap

Definitie

Hiermee wordt een waarde opgehaald die aangeeft of CAPS LOCK is ingeschakeld.

public:
 property bool CapsLock { bool get(); };
public bool CapsLock { get; }
member this.CapsLock : bool
Public ReadOnly Property CapsLock As Boolean

Waarde van eigenschap

Een Boolean waarde: True als CAPS LOCK is ingeschakeld; anders. False

Voorbeelden

In dit voorbeeld wordt de My.Computer.Keyboard.CapsLock eigenschap gebruikt om te bepalen of caps lock van de computer is ingeschakeld.

If My.Computer.Keyboard.CapsLock Then
    MsgBox("CAPS LOCK on")
Else
    MsgBox("CAPS LOCK off")
End If

Opmerkingen

Alleen de status caps lock wordt geretourneerd.

Beschikbaarheid per projecttype

Projecttype Available
Windows-toepassing Yes
Klassebibliotheek Yes
Console toepassing Yes
Windows-besturingselementbibliotheek Yes
Webcontrolebibliotheek No
Windows-serviceprogramma Yes
Website No

Van toepassing op

Zie ook