Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i turn on & off capslock & nun lock

Status
Not open for further replies.

bootlace

Programmer
Dec 5, 2001
2
GB
I cannot find any info on seting the led's on the key board
for the capslock & num lock eta in visual basic can any one help.
 
Here is sample code for checking to see if CAPS LOCK is on. If not, it will turn it on.

Hope this helps!

Dim iRetVal As Integer
' Check the status of the CAPS LOCK key
iRetVal = GetKeyState(VK_CAPITAL)

If iRetVal = 1 Then
' CAPS LOCK is already on - continue
Else
' CAPS LOCK is OFF - toggle key to ON
NTToggleKeyCaps
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top