Results 1 to 14 of 14

Thread: Disable ctrl + alt + delete

  1. #1

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721

    Disable ctrl + alt + delete

    Hi

    Has anyone got a snippet of code that would disble the ctrl + alt +
    del funtionality????

    Pretty Please....

    Thanks
    ** HOLLY **

  2. #2
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338
    It is not possible to do this on Windows NT based platforms (this includes 2000 and XP). For Windows 98 you can use the SystemParametersInfo function and let your application imitate a screen saver, this disables system key-combinations such as Ctrl+Alt+Del and Alt+Tab etc.

  3. #3

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    So there is not way of disabling ctrl+alt+del on a win 2000 OS....


    Thanks

    ** HOLLY **

  4. #4
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338
    Actually there is, but it's obviously undocumented and really hard to find out. How do I know?

    Microsoft Virtual Machine 'emulates' (not particularly emulated but yuo get my drift) another Windows session, using the same PC, but in a window (or full screen). If you press Ctrl+Alt+Del within the VM session, instead of the unemulated Windows going to the "Windows Security" dialog box, it simply opens up a message box saying "Windows has detected you pushed Ctrl+Alt+Del. While using Windows VM, please use Ctrl+Alt+End instead."

    I heard it has something to do with the msgina.dll, that handles Windows Logon.

  5. #5

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    so it is possible? do you know how I may accomplish this?

    What api will I have to use?

    ** HOLLY **

  6. #6
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338
    It's possible, but I think only the programmers of Microsoft Virtual Machine and the authors of msgina.dll know how to do it.

    It would defeat the entire purpose of Windows NT's security by releasing how to do it. I'm afraid you are stuck on this one, no amount of searching will get you any further. Also, the function won't have a name, it would be called by ordinal number, most likely, to prevent people trying to search for a function name within msgina.dll.

  7. #7

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    Well it looks as though I'm stuck..... What a pain.....


    Thanks for your help!!!
    ** HOLLY **

  8. #8
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338
    Just out of curiosity, what kind of program do you intend to build, if it requires the disabling of Ctrl+Alt+Del?

  9. #9

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    I have written an inventory system.....You do actually need a
    pwd to close the application down but the problem is the user
    keeps pressing the ctrl + alt + del keys to close the application..

    ** HOLLY **

  10. #10

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    Just for curosity - is this possible on a CE operating system???

    ** HOLLY **

  11. #11
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338
    No, the SystemParametersInfo function is not availible on Windows CE, and I can't think of another way to do it, since you can't create a keyboard hook function either.

  12. #12

    Thread Starter
    Fanatic Member holly's Avatar
    Join Date
    Aug 2002
    Location
    Somewhere on earth
    Posts
    721
    OK, Thanks again for all your help!! Its very much appreciated!!
    ** HOLLY **

  13. #13
    Junior Member
    Join Date
    Apr 2004
    Posts
    16
    If You really want to disable ctrl alt del...you can. Its sort of a trick but it works on all windows i think. heres how to do it..

    add a timer to your program and set it to false and set the interval anywhere between 1 - 100. Then add this at the top of your program....

    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Const WM_CLOSE = &H10

    Then on the timer put this....


    Private Sub Timer1_Timer()
    Const WM_CLOSE = &H10
    Dim winHwnd As Long
    Dim RetVal As Long
    winHwnd = FindWindow(vbNullString, "Windows Task Manager")
    If winHwnd <> 0 Then
    PostMessage winHwnd, WM_CLOSE, 0&, 0&
    Else
    End If
    End Sub

    Then add this to when form loads...

    Timer1.Enabled = True

    and to disable just put

    Timer1.Enabled = False

    Hope this helped

  14. #14
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    ARGAHGHGHAGHHAHHHH

    don't reply to posts that are old. don't do that. don't. don't.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

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