• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 958
  • Last Modified:

how to disable Alt+F4 function???

I need to disable the function of the ALT+F4 shortcut. The user shoultn't be able to close the appplication with it. How can I do this?
0
pman
Asked:
pman
  • 3
1 Solution
 
lortegaCommented:
call SystemParametersInfo with SPI_SETSCREENSAVEACTIVE      as first parameter...
0
 
pmanAuthor Commented:
Sorry! But I don't understand this comment. Where can I find SystemParametersInfo and what does it mean. The same with SPI_SETSCREENSAVEACTIVE, ...
I'm a beginner in Delphi!

0
 
intheCommented:
Hi,
i dont understand that comment either???
here is one that i use:

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if (ssALT IN Shift) AND(Key = VK_F4) then
KEY:=0;
end;

Regards Barry
0
 
pmanAuthor Commented:
Sorry! But I don't understand this comment. Where can I find SystemParametersInfo and what does it mean. The same with SPI_SETSCREENSAVEACTIVE, ...
I'm a beginner in Delphi!

0
 
pmanAuthor Commented:
Thank you! It works perfectly.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now