desabilitar teclas
Como desabilito as teclas ALT +F4 ?
Mineiro
Curtidas 0
Respostas
Nildo
12/02/2003
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;
GOSTEI 0