Link to home
Start Free TrialLog in
Avatar of ItsMe
ItsMe

asked on

Blinking Num LED

Hi! I want to make the Num Led blinking. How do I switch
Num on/off ?

Regards
ItsMe
Avatar of williams2
williams2

What Num LED?
Avatar of ItsMe

ASKER

The lamp on the keyboard which is turned on/off when you press the "Num" key.
Hi ItsMe,

try these :

procedure TMyForm.Button1Click(Sender: TObject);
  Var
    KeyState  :  TKeyboardState;
  begin
    GetKeyboardState(KeyState);
    if (KeyState[VK_NUMLOCK] = 0) then
      KeyState[VK_NUMLOCK] := 1
    else
      KeyState[VK_NUMLOCK] := 0;
    SetKeyboardState(KeyState);
  end;

Regards, Zif.

I guess that should answer your question :-)
Avatar of ItsMe

ASKER

That doesn't work but I've found out that it works when I send a Keyboard Event Message.

Avatar of ItsMe

ASKER

Uuups, I wanted to accept it. :-) Please send a comment as answer so that I can accept it.
ASKER CERTIFIED SOLUTION
Avatar of ZifNab
ZifNab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial