J
JerryWEC
What is the best way to do Caps Lock and Num Lock for a statusbar control in
vs2005?
I was doing this in vs2003...
Private Sub SetPanelLocks()
Try
Dim numLockValue As Integer = 0
Dim capsLockValue As Integer = 0
With Me.sbrApplication.Panels(panelIndex.AppCapsLock)
capsLockValue = GetKeyState(Keys.CapsLock)
If CType(capsLockValue, Boolean) = True Then
.Text = "Caps On"
Else
.Text = "Caps Off"
End If
End With
With Me.sbrApplication.Panels(panelIndex.AppNumLock)
numLockValue = GetKeyState(Keys.NumLock)
If CType(numLockValue, Boolean) = True Then
.Text = "Num On"
Else
.Text = "Num Off"
End If
End With
Catch ex As Exception
End Try
End Sub
I'm using the api GetKeyState with the Keys.NumLock and Keys.CapsLock.
However, this is not converting to VS2005. What is the best way to set the
status of these keys using VB2005?
Thanks in advance!
Jerry M
vs2005?
I was doing this in vs2003...
Private Sub SetPanelLocks()
Try
Dim numLockValue As Integer = 0
Dim capsLockValue As Integer = 0
With Me.sbrApplication.Panels(panelIndex.AppCapsLock)
capsLockValue = GetKeyState(Keys.CapsLock)
If CType(capsLockValue, Boolean) = True Then
.Text = "Caps On"
Else
.Text = "Caps Off"
End If
End With
With Me.sbrApplication.Panels(panelIndex.AppNumLock)
numLockValue = GetKeyState(Keys.NumLock)
If CType(numLockValue, Boolean) = True Then
.Text = "Num On"
Else
.Text = "Num Off"
End If
End With
Catch ex As Exception
End Try
End Sub
I'm using the api GetKeyState with the Keys.NumLock and Keys.CapsLock.
However, this is not converting to VS2005. What is the best way to set the
status of these keys using VB2005?
Thanks in advance!
Jerry M