Caps Lock and Num Lock ?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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


.



Relevant Pages

  • Enabling caps lock on login to Win2k TS
    ... Our floor manager would like the caps lock to be set to ON when a user logs ... login script ... In each instance, the result is that the caps lock light comes on, the num ...
    (microsoft.public.win2000.general)
  • Re: Word Doc Alert to CAPS ON ; CAPS OFF
    ... If you're referring to the words "Caps Lock" that appear in the status bar at ... a functionality that alerted me when I had the CAP lock key on. ... I have seen a "CAPS ON" popup when using a wireless keyboard, ...
    (microsoft.public.word.docmanagement)
  • Re: Word Doc Alert to CAPS ON ; CAPS OFF
    ... "Jay Freedman" wrote: ... If you're referring to the words "Caps Lock" that appear in the status bar at ... a functionality that alerted me when I had the CAP lock key on. ...
    (microsoft.public.word.docmanagement)
  • Re: WHY IS JCL ALLERGIC TO LOWER CASE?
    ... we definitely install our own software _way_ more often than any customer will. ... When testing the install for a new release, we will easily install it dozens of times whereas the average customer installs it only once. ... The modern "Caps Lock" behavior is a welcome adaptation from the non-mainframe world. ...
    (bit.listserv.ibm-main)
  • Re: Using DLookup on a query to set value on AfterUpdate
    ... I suggest you alter your query (Q_JobNumMax) to give Maxa field ... Then add quotes to your DLookup function call. ... Private Sub JobType_AfterUpdate ...
    (microsoft.public.access.formscoding)