Search This Blog

Monday, January 27, 2014

CapsLock pressed C# example

C# > Controls > > IsKeyLocked

IsKeyLocked check if CAPS LOCK, NUM LOCK, or SCROLL LOCK key is are pressed.

Example:

public static bool CapsLockActive()
{
     return Control.IsKeyLocked(Keys.CapsLock);
}