Private Sub Form_Load()
If CapsLock() = 1 Then Label1 = "On" Else _
Label1 = "Off"
End Sub
'// Flippa mellan av/på
Private Sub Command1_Click()
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPITAL) = _
IIf(kbArray.kbByte(VK_CAPITAL) = 1, 0, 1)
SetKeyboardState kbArray
Label1 = IIf(CapsLock() = 1, "On", "Off")
End Sub
'// CapsLock PÅ
Private Sub Command2_Click()
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPITAL) = 1
SetKeyboardState kbArray
Label1 = IIf(CapsLock() = 1, "On", "Off")
End Sub
'// CapsLock AV
Private Sub Command3_Click()
GetKeyboardState kbArray
kbArray.kbByte(VK_CAPITAL) = 0
SetKeyboardState kbArray
Label1 = IIf(CapsLock() = 1, "On", "Off")
End Sub