Solved

how to disable Alt+F4 function???

Posted on 1999-01-22
5
948 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now