Arsip: Melarang Alt+F4 dan Alt+Tab


by delphy in Articles more 15 years ago 1331
ingin membuat aplikasi sehingga user tidak bisa menekan Alt+F4 ?
skrin ini bisa membantu anda, bahkan bisa diterapkan juga agar melarang penekanga tombol Alt+Tab
public
procedure AppMessage(var Msg: TMSG; var HAndled: Boolean);
end;
{...}
implementation
{...}
procedure TfDelphiID.FormCreate(Sender: TObject);
begin
// set your applications message handler to your new one
Application.OnMessage := AppMessage;
end;
procedure TfDelphiID.AppMessage( var Msg: TMSG; var Handled: Boolean);
begin
// let your application handle all messages initially
Handled := False;
case Msg.Message of
WM_SYSKEYDOWN:
if Msg.wParam = VK_F4 then
Handled := True; // don't allow ALT-F4
  end;
end;

selamat mencoba.

saduran dari:
http://www.swissdelphicenter.ch/torry/showcode.php?id=43

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com