Re: VB6-Capturing Caps Lock, Scroll Lock, Num Lock and Insert Key Status
i found this gd but i made a few adjustments to it instead of having them as msgboxs i put them into a listbox then modified it so instead of it multiplying the values everytime you click on the button, it wipes the previous values and then calls the command again.
VB Code:
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Sub cmd_state_Click()
If List_state.ListCount = 0 Then
If GetKeyState(vbKeyCapital) = 0 Then
List_state.AddItem "Capital OFF"
Else
List_state.AddItem "Capital ON"
End If
If GetKeyState(vbKeyNumlock) = 0 Then
List_state.AddItem "NumLock OFF"
Else
List_state.AddItem "NumLock ON"
End If
If GetKeyState(vbKeyInsert) = 0 Then
List_state.AddItem "Insert OFF"
Else
List_state.AddItem "Insert ON"
End If
If GetKeyState(vbKeyScrollLock) = 0 Then
List_state.AddItem "Scroll Lock OFF"
Else
List_state.AddItem "Scroll Lock ON"
End If
Else:
List_state.Clear
Call cmd_state_Click
End If
End Sub
dont believe in all that you've been told!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Re: VB6-Capturing Caps Lock, Scroll Lock, Num Lock and Insert Key Status
thank you very much for your suggestion...but instead of the listbox, we can update label caption for these key status...will incorporate that...but have you checked the attached zip file?
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
Re: VB6-Capturing Caps Lock, Scroll Lock, Num Lock and Insert Key Status
hey, this was really good when i found it, it seemed cool, and the other week when i got bored i found the file, and developed on it so much, there is a splash screen at the begging letting you change loads of settings and the form that tells you about the states sits in the top right corner and it aslo sits on top of all other programs or windows you have open, good if your writing in a text editor and dont want to look down at the keyboard to check the states.
i would upload the files and the exe but as i havent uploaded onto this site before,i dont know , could some one message me and tell me how and ill put it up in a new thread. i just thought someone might wanna make use of the code. i will also refer back to this thread in the new one.
msg please
will
dont believe in all that you've been told!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!