private
procedure AppMessage(var Msg: TMSG; var Handled: Boolean);
public
{ Public declarations }
end;
…
…
implementation
…
…
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage := AppMessage;
end;
procedure TForm1.AppMessage(var Msg: TMSG; var Handled: Boolean);
begin
// meng-handle pesan
Handled := False;
case Msg.Message of
WM_SYSKEYDOWN:
if Msg.wParam = VK_F4 then
Handled := True; // cegah Alt-F4
end;
end;
0 comments:
Post a Comment
Jangan Lupa Memberikan Komentar, Namun Tolong Agar Menggunakan Bahasa Yang BAIK dan SOPAN Terima Kasih...