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?
pmanAsked:
Who is Participating?
 
intheConnect With a Mentor Commented:
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
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.