Arsip: Melarang Alt+F4 dan Alt+Tab


by delphy in Articles more 20 years ago 3139
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

AI Forward

๐Ÿš€ We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

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