Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Private Declare Function GetKeyState Lib "user32" _
(ByVal nVirtKey As Long) As Integer
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 MapVirtualKey Lib "user32" _
Alias "MapVirtualKeyA" _
(ByVal wCode As Long, ByVal wMapType As Long) As Long
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
Private Sub SetKeyState(ByVal Key As Long, ByVal State As Boolean)
Call keybd_event(Key, MapVirtualKey(Key, 0), _
KEYEVENTF_EXTENDEDKEY Or 0, 0)
Call keybd_event(Key, MapVirtualKey(Key, 0), _
KEYEVENTF_EXTENDEDKEY Or KEYEVENTF_KEYUP, 0)
End Sub
Private Property Get CapsLock() As Boolean
CapsLock = GetKeyState(KeyCodeConstants.vbKeyCapital) = 1
End Property
Private Property Let CapsLock(ByVal Value As Boolean)
Call SetKeyState(KeyCodeConstants.vbKeyCapital, Value)
End Property
Private Sub Form_Load()
CapsLock = Not CapsLock
Unload Me
End Sub