System.Windows.Forms.Control.IsKeyLocked Method

Determines whether the CAPS LOCK, NUM LOCK, or SCROLL LOCK key is in effect.

Syntax

public static bool IsKeyLocked (Keys keyVal)

Parameters

keyVal
The CAPS LOCK, NUM LOCK, or SCROLL LOCK member of the System.Windows.Forms.Keys enumeration.

Returns

true if the specified key or keys are in effect; otherwise, false.

Remarks

Use the Control.IsKeyLocked(Keys) property to determine whether the CAPS LOCK, NUM LOCK, or SCROLL LOCK keys are on, whether individually or in combination.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0