VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Keyboard Lights On And Off

by Nidhi (2 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 29th July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Keyboard Lights On And Off

API Declarations


Private Declare Function SetKeyboardState Lib "user32" Alias "SetKeyboardState" (lppbKeyState As Byte) As Long
Private Const VK_CAPITAL = &H14
Private Const VK_NUMLOCK = &H90


Rate Keyboard Lights On And Off



redim keyboard buffer(256) as byte
get keyboardstate keyboardbuffer(0)
if keyboardbuffer(vk_capital) and 1 then
keyboardbuffer(vk_capital)=0
else
keyboardbuffer(vk_capital)=1
end if
if keyboardbuffer(vk_numlock) and 1 then
keyboardbuffer(vk_numlockl)=0
else
keyboardbuffer(vk_numlockl)=1
end if
set keyboardstate keyboardbuffer(0)
end sub

Download this snippet    Add to My Saved Code

Keyboard Lights On And Off Comments

No comments have been posted about Keyboard Lights On And Off. Why not be the first to post a comment about Keyboard Lights On And Off.

Post your comment

Subject:
Message:
0/1000 characters