Programming Get the current state of "Num Lock" on the keyboard "Caps Lock" Scroll Lock
Implement the API function declaration public declare function public declare function getKeyState lib "Byval NVIRTKEY AS Integer" (Byval Nvirtkey AS Integer) AS Integer 'Status IF (GetKeyState (& H14) and 1 = 1) THEN ME. Text = "Light" else me.text = "Light" END IF The above program is converted to & H91 is the state of the Scroll Lock key,
Replacing & H90 is the state of Num Lock.