Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Trucos (https://www.clubdelphi.com/foros/forumdisplay.php?f=52)
-   -   Mostrar Status CapLock, NumLock y ScrollLock en Status Bar (https://www.clubdelphi.com/foros/showthread.php?t=80459)

vtdeleon 21-07-2006 16:15:02

Mostrar Status CapLock, NumLock y ScrollLock en Status Bar
 
Código Delphi [-]
Procedure TMain.KeyState();
begin
  If GetKeyState(VK_NUMLOCK) and 1 = 1 Then
    StatusBar.Panels[2].Style:= psText
  else
    StatusBar.Panels[2].Style:= psOwnerDraw;

  If GetKeyState(VK_CAPITAL) and 1 = 1 Then
    StatusBar.Panels[3].Style:= psText
  else
    StatusBar.Panels[3].Style:= psOwnerDraw;

  If GetKeyState(VK_SCROLL) and 1 = 1 Then
    StatusBar.Panels[4].Style:= psText
  else
    StatusBar.Panels[4].Style:= psOwnerDraw;
end;
Hay que tener en cuenta es agregar en los uses las units LCLType y LCLIntf (en Lazarus);

SED 21-07-2006 16:15:03

pero en ke evento lo insertas para ke lea estas instrucciones?

PINO72 27-08-2006 22:10:46

HOLA: PUEDES COLOCARLO EN LA EJECUCIÓN DE UN TIMER.
SALUDOS

vtdeleon 27-09-2006 14:16:21

Puedes ponerlo en el evento que desees, cualquiera en el que desees que se muestre el estado de estas teclas. Como dice PINO72 en un TIMER.

Héctor Randolph 29-09-2006 02:19:56

Observación: Efectivamente hay que agregar las units LCLType y LCLIntf (Solamente en Lazarus)


La franja horaria es GMT +2. Ahora son las 23:43:12.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi