Wednesday, May 16, 2012

Membuat Tombol ALT+F4 menjadi tak berfungsi :)

public
       procedure AppMessage(var Msg: TMSG; var HAndled: Boolean);
end;
{...}
implementation
{...}



procedure TForm1.FormCreate(Sender: TObject);
begin
    Application.OnMessage := AppMessage;
end;


procedure TForm1.AppMessage(var Msg: TMSG; var Handled: Boolean);
begin
  Handled := False;
  case Msg.Message of
    WM_SYSKEYDOWN:
      if Msg.wParam = VK_F4 then
        Handled := True; // Matikan Fungsi ALT-F4
  end;
end;




:))

No comments:

Post a Comment