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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ctrl-Alt-Delete workaround? 1

Status
Not open for further replies.

bob64

Programmer
May 19, 2001
3
US
Anyone know if there is a way to disable ctrl-alt-del for a program? I am working on a program to lock the desktop by making a maximized form that cannot be closed without a password, but i have noticed that you can press ctrl-alt-del and end task as a way around it. thanks
 
The following only works with 95/98 as far as I know. Call the following code on the form's constructor:
Code:
 // Disable CTRL-ALT-DEL construction
SystemParametersInfo(SPI_SCREENSAVERRUNNING, TRUE , NULL,0);

Call the following code on the form's desctructor:
Code:
// Enabled CTRL-ALT-DEL when we close
SystemParametersInfo(SPI_SCREENSAVERRUNNING, FALSE , NULL,0);

BTW, this came from . You can check there for more info.



James P. Cottingham

I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
 
Be careful that you can close a form also with Alt+F4 key combination! If you need help to override that ask.
 
How about ALT-TAB and CTRL-ESC, ...

Does the SystemParametersInfo call cover all windows keys ?
 
I think so! As you go in "screensaver-mode" all key combination "Windows related" are disabled but by default a FORM in BCB can be closed by ALT+F4 (to disable read the borland community faq).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top