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

Disable Ctrl+Alt+Del from C#

Status
Not open for further replies.

WebStar

Programmer
May 1, 2002
69
DE
I need to know how can I disable ctrl+alt+del key combination in windows 98/Me and XP/2000(if it's possible). Thank you!
 
What exactly are you trying to accomplish?

Do you want a C# program that will capture that key combination or are you looking for a way to disable ctrl-alt-del from a system?

The first is straight-forward but I don't think it will accomplish what you are appear to be asking for. ---
dino
 
I have a program that starts as shell, instead of explorer.exe. So I have a restricted policy on what windows are alowed to be opend. But with Ctrl+Alt+Del my program can be stoped. In win2000/xp the user can start explorer... and stuff. I wanna disable this combination from the entire system.
 
This is VB.NET code (sorry) but it should head you in the right direction. Essentially, your code will need to consume the event generated from the keyboard. So, you create an OnKeyPress event handler which checks each key press event. If it's ctrl-alt-del & do nothing, otherwise, you'll need to pass the event onto the parent object so that you can do things, like, type etc.

protected overrides sub OnKeyPress (kea as KeyEventArgs)
select kea.keycode
   case Keys.Right
         messagebox.Show("Right key")
   case keys.left
         messagebox.show("Left key")
   etc.
end select
end sub ---
dino
 
Dino -
Ctrl-Alt-Del is called the Secure Attention Sequence, and is grabbed by the OS before it enters the message loop, so your program will never see it.

WebStar -
Take a look at these knowledgebase articles:

In short, you can't disable it without writing a custom Gina.DLL, which requires the Windows DDK (device driver kit).

Chip H.
 
ok...i can't do it under win2000 and xp but what about 98 and Me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top