Keyboard.CapsLock Propriété

Définition

Obtient une valeur qui indique si la touche VERR. MAJ est activée.

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

Valeur de propriété

Valeur Boolean : True si LE VERROUILLAGE CAPS est activé ; sinon, False.

Exemples

Cet exemple utilise la My.Computer.Keyboard.CapsLock propriété pour déterminer si le VERROUILLAGE CAPS de l’ordinateur est activé.

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

Remarques

Seul l’état de CAPS LOCK est retourné.

Disponibilité par type de projet

Type de projet Disponible
Application Windows Oui
Bibliothèque de classes Oui
Application console Oui
Bibliothèque de contrôles Windows Oui
Bibliothèque de contrôles web Non
Service Windows Oui
Site web Non

S’applique à

Voir aussi