Make your own free website on Tripod.com
Hide Your Program From The Ctrl-Alt-Del Process List

Preparations

Add 2 Command Buttons to your form.
Press the first to hide you program, and the second to show it again.

Module Code

Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0

Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID _
As Long, ByVal dwType As Long) As Long

Form Code

Public Sub HideApp(Hide As Boolean)
    Dim ProcessID As Long
    ProcessID = GetCurrentProcessId()

    If Hide Then
        retval = RegisterServiceProcess(ProcessID, RSP_SIMPLE_SERVICE)
    Else
        retval = RegisterServiceProcess(ProcessID, RSP_UNREGISTER_SERVICE)
    End If
End Sub


Private Sub Command1_Click()
    HideApp (True)
End Sub

Private Sub Command2_Click()
    HideApp (False)
End Sub

Go Back