Programming Get the current state of "Num Lock" on the keyboard "Caps Lock" Scroll Lock

xiaoxiao2021-03-05  25

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.

转载请注明原文地址:https://www.9cbs.com/read-32518.html

New Post(0)