CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2003
    Location
    Melbourne
    Posts
    27

    Question Doing CTRL-ALT-DEL

    Hi guys,

    Within Visual Basic, how do I send "CTRL-ALT-DEL"? All I want to do is bring up the Windows Security box, but SendKeys doesn't permit the combination...

    Any code appreciated!

    Best wishes,

    Mark

  2. #2
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: Doing CTRL-ALT-DEL

    you cant. ctrl+alt+del is protected for reasons of security.
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  3. #3
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: Doing CTRL-ALT-DEL

    actually.. that said, a program called VNC that is used to operate a computer remotely, over a network, has a menu option "Send CTRL ALT DEL" which causes the remote machine to display the options box. i think they may have used a low level keyboard hook of some kind though..
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  4. #4
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: Doing CTRL-ALT-DEL

    did a bit of research and it seems that ctrl+alt+delete is actually a special combination that, though some specific wiring in the keyboard, causes an interrupt to be generated on the cpu with a specific code. windows handles this interrupt and shows the security screen. how you would emulate this interrupt yourself, i do not know. might be good if you told us WHY you want to do this
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  5. #5
    Join Date
    Mar 2003
    Location
    Melbourne
    Posts
    27

    Re: Doing CTRL-ALT-DEL

    Terminal Services doesn't allow me to do a CTRL-ALT-DEL 'across the wire'. The key combination activates the local terminal's security box.

    I've tried fiddling with the settings of terminal services client but (thus far) to no avail. Of course, I might be missing something horribly basic - let me know if I am!

    If there was an icon on the remote server's desktop that I run which "sends" CTRL-ALT-DEL that would be very useful!

    Mark

  6. #6
    Join Date
    Mar 2003
    Location
    Melbourne
    Posts
    27

    Re: Doing CTRL-ALT-DEL

    Although, come to think of it, any program doesn't have to "send" CTRL-ALT-DEL, it merely has to invoke the "Windows Security" box. If it is known how to invoke that box, who cares about CTRL-ALT-DEL!

    Mark

  7. #7
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: Doing CTRL-ALT-DEL

    re; terminal services

    i read that you use Ctrl+Alt+End when using TS, if you want the security box to appear on the remote machine. Ctrl+Alt+Del triggers the local one

    I also recall reading on microsoft web site that the key combination is AltGr+Del to trigger the remote box (when under ts)
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  8. #8
    Join Date
    Oct 2003
    Location
    Timisoara, Romania
    Posts
    460

    Re: Doing CTRL-ALT-DEL

    Although it doesn't work for me it seems that there is a way to trigger the "Windows Security" box. Have a look at http://www.codeproject.com/system/al...rol_delete.asp. (it's in VC++)
    If you just want to call the Task Manager than it's simple 'cause you can use Shell to execute taskmgr.exe from windows\system32.
    You liked it? Please show your gratitude and rate it!

    There is no 'patch' for stupidity.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured