Solved

how to disable Alt+F4 function???

Posted on 1999-01-22
5
950 Views
Last Modified: 2008-02-26
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
Comment
Question by:pman
  • 3
5 Comments
 
LVL 2

Expert Comment

by:lortega
ID: 1362828
call SystemParametersInfo with SPI_SETSCREENSAVEACTIVE      as first parameter...
0
 

Author Comment

by:pman
ID: 1362829
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
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 1362830
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
 

Author Comment

by:pman
ID: 1362831
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
 

Author Comment

by:pman
ID: 1362832
Thank you! It works perfectly.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, DigitalPersona Fingerprint reader and MySQL 6 323
Delphi : could not find program, '...exe' 2 191
creating threads in delphi 1 130
Dynamically Created Query 3 62
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question