Results 1 to 4 of 4

Thread: Disable Ctrl Alt Del

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    medina, OH
    Posts
    125
    How can i disable the user from pressing Ctrl Alt Del? I want the only way to exit my program is by using by program to exit.

  2. #2
    Guest
    This will either enable or disable Ctrl-Alt-Del from being used.

    Code:
    Private Declare Function SystemParametersInfo Lib _
    "user32" Alias "SystemParametersInfoA" (ByVal uAction _
    As Long, ByVal uParam As Long, ByVal lpvParam As Any, _
    ByVal fuWinIni As Long) As Long        
    
    Sub DisableCtrlAltDelete(bDisabled As Boolean)
        Dim X As Long
        X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
    End Sub
            
    Usage:
    
    'Disable
    Call DisableCtrlAltDelete(True)  
          
    'Enable
    Call DisableCtrlAltDelete(False)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    medina, OH
    Posts
    125
    That worked great thanks.

  4. #4
    New Member
    Join Date
    Aug 2000
    Posts
    8

    Remove program from takslist

    You might just want to remove your program from the tasklist. This way, they can still use CTRL+ALT+DEL for another program that freezes and your program won't be on the list.

    Module:
    Code:
    Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
    Const RSP_SIMPLE_SERVICE = 1
    Const RSP_UNREGISTER_SERVICE = 0
    Form:
    Code:
    Dim pid As Long
    Dim regserv As Long
        pid = GetCurrentProcessId()
        regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)

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