Como saber se pressionei quot;Ctrl Gquot; ??

Delphi

21/11/2003

Preciso saber se o usuário pressionou Control G.

Alguém pode me ajudar

Pedro - SP


Pedro Dias

Pedro Dias

Curtidas 0

Respostas

Anorex

Anorex

21/11/2003

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If (Shift = [ssCtrl]) And (Key = 71) Then
Label1.Caption := ´Certo´
Else
Label1.Caption := ´Errado´;
end;


GOSTEI 0
Namerda

Namerda

21/11/2003

TENTE ISTO :

EVENTO DO COMPONENTE TTIMER :
PONHA A PROPRIEDADE INTERVAL PARA + OU - 50 ...

BOA SORTE...

procedure TForm1.Timer1Timer(Sender: TObject);
begin
IF (getkeystate(VK_Control) < 0) AND (getkeystate(ord(´G´)) < 0) THEN
SHOWMESSAGE(´PROSSIONOU´);
end;


É MEIO FEIO MAS FUNCIONA...


GOSTEI 0
Namerda

Namerda

21/11/2003

A MINHA DICA FUNCIONA MESMO QUE O TEU PROJETO ESTEJA MINIMIZADO...


GOSTEI 0
POSTAR