file.vb
Private Declare Function GetKeyState Lib "user32" (ByValnVirtKey As Long) As Integer
Private Sub Form_Load()
StatusBar1.Panels(1) = "HI"
StatusBar1.Panels(2) = Date
StatusBar1.Panels(3) = Time
End Sub
Private Sub Timer1_Timer()
If GetKeyState(vbKeyCapital) = 0 Then
StatusBar1.Panels(4) = "CAPS OFF"
Else
StatusBar1.Panels(4) = "CAPS ON"
End If
If GetKeyState(vbKeyNumlock) = 0 Then
StatusBar1.Panels(5) = "NUM LOCK OFF"
Else
StatusBar1.Panels(5) = "NUM LOCK ON"
End If
End Sub