Solved

how to disable Alt+F4 function???

Posted on 1999-01-22
5
954 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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