desabilitar teclas
12/02/2003
0
Como desabilito as teclas ALT +F4 ?
Mineiro
Curtir tópico
+ 0
Responder
Posts
12/02/2003
Nildo
public
{ Public declarations }
fecha: Boolean;
end;
implementation
{$R *.DFM}
Function GetStateK (Key: integer): boolean;
begin
Result := Odd (GetKeyState (Key));
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
If Not fecha Then
Action := caNone Else
Action := caFree;
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If GetStateK (VK_LMENU) And (Key = VK_F4) Then
fecha := False;
end;
{ Public declarations }
fecha: Boolean;
end;
implementation
{$R *.DFM}
Function GetStateK (Key: integer): boolean;
begin
Result := Odd (GetKeyState (Key));
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
If Not fecha Then
Action := caNone Else
Action := caFree;
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If GetStateK (VK_LMENU) And (Key = VK_F4) Then
fecha := False;
end;
Responder
Clique aqui para fazer login e interagir na Comunidade :)