VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

This code is used to change the state of the caps lock so if its on then its turned off and if its

Stringer  (11 Submissions)   Miscellaneous   VB 6.0   Unknown Difficulty   Mon 6th October 2003   Mon 8th February 2021

This code is used to change the state of the caps lock so if its on then its turned off and if its off its turned on!! (If there are any

API Declarations


Option Explicit

Private Const VER_PLATFORM_WIN32_NT = 2
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
Private Const VK_CAPITAL = &H14
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2


Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type

' API declarations:

Private Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" _
(lpVersionInformation As OSVERSIONINFO) As Long

Private Declare Sub keybd_event Lib "user32" _
(ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Declare Function GetKeyboardState Lib "user32" _
(pbKeyState As Byte) As Long

Private Declare Function SetKeyboardState Lib "user32" _
(lppbKeyState As Byte) As Long

Private Declare Function GetKeyState Lib _
"user32" (ByVal nVirtKey As Long) As Integer

'This code was generated by JOHN STRINGER

Rate This code is used to change the state of the caps lock so if its on then its turned off and if its (1(1 Vote))
This code is used to change the state of the caps lock so if its on then its turned off and if its .bas

This code is used to change the state of the caps lock so if its on then its turned off and if its Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters