Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Caps Lock
#1
Has anybody got any code to make sure the caps lock is on
Reply
#2
This is the best i can offer, i'm not sure if theres a better way. Windows only aswell.

Code:
#include "windows.bi"

Option Explicit

While Inkey$ <> Chr(27)
  Locate 1, 1
  If GetKeyState(VK_CAPITAL) <> 0 Then
    Print "CAPS LOCK - ON "
  Else
    Print "CAPS LOCK - OFF"
  End If
  Sleep 100
Wend
EVEN MEN OF STEEL RUST.
[Image: chav.gif]
Reply
#3
You can make sure that CAPS LOCK is on,
but that won't prevent the user from turning it OFF just when you thought it was ON.

The same applies for the NUM LOCK.
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)