Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture Cntrl-Alt-Del

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I need to capture Cntrl-Alt-Del as it occurs. I dont want to get it on notification of the window closing. Some of the other applications may shutdown before mine... Is there a way to hook the windows message queue to capture this? Am I making this too difficult ? Thanks
 
hi ahhchew,

Look up this command in the Delphi helpfile:

ShortCutToKey

I hope this helps,

BobbaFet Everyone has a right to my opinion.
E-mail me at cwcon@programmer.net
 
Hi,
You can disable Ctrl+Alt+Del, Ctrl+Esc and Alt+Tab combinations by persuading Windows that a screen saver is running.
Use the SystemParametersInfo Win API function.
Example:
procedure DisableCtrlAltDelete(bDisabled: Boolean)
var
lpvParam: Boolean;
X: Long;
begin
X := SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, bDisabled, lpvParam, 0);
End;

I have not tried the above code in an application, so it could have errors, but this is just for an idea.
HtH


Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 
Oops! I didn't read your question fully, but hope the function helps.
I am not sure what the aim of your program is, but if you want it to keep running, why don't you register it as a service, but in this way, it won't appear on the task list!


var
bbb : Integer;

bbb := 0;
SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @bbb, 0);
is correct way to disable Ctrl+Alt+Del. Welcome to the Pythian Games!
Long live Godess Athena!
dArktEmplAr of Delphi Oracle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top