Put all this in the declaration section
Put this in the form_loadCode:Private Declare Function GetKeyboardState Lib "user32" (pbKeyState As Byte) As Long Private Declare Function SetKeyboardState Lib "user32" (lppbKeyState As Byte) As Long Const VK_NUMLOCK = &H90
Code:Dim cls As Boolean Dim keys(0 To 255) As Byte GetKeyboardState keys(0) cls = keys(VK_NUMLOCK) If cls <> True Then keys(VK_CAPITAL) = 1 SetKeyboardState keys(0) End If




Reply With Quote