VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Hide your program in the Ctrl-Alt-Delete Dialog

by Neo (11 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (19 Votes)

Always wanted to hide your program in Ctrl-Alt-Delete Dialog box, So people dont close it from there when you dont want them to....Well use this code and your problems will be solved...They cannot close your program unless you let them through yours...MUST HAVE!!!!

Assumes
Create a Module and put the code below and call the Subs like... Show_Program_In_CTRL_ALT_DELETE , And Hide_Program_In_CTRL-ALT-DELETE
Side Effects
Hides your Program in the Ctrl-Alt-Delete...not permanently...

Rate Hide your program in the Ctrl-Alt-Delete Dialog

' ----Api Declares for this code
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
' ----Public Declares for this code
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0

' ----What makes it invisible/visible in Ctrl-alt-delete
' Note: That if you run this program from your development 
'    enviorment(VB) you will not see your development 
'    enviorment(VB) or your programs name in the 
'    Ctrl-Alt-Delete Dialog. 
'    From AciD email Me at [email protected]
Public Sub Hide_Program_In_CTRL_ALT_Delete()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub Show_Program_In_CTRL_ALT_DELETE()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub

Download this snippet    Add to My Saved Code

Hide your program in the Ctrl-Alt-Delete Dialog Comments

No comments have been posted about Hide your program in the Ctrl-Alt-Delete Dialog. Why not be the first to post a comment about Hide your program in the Ctrl-Alt-Delete Dialog.

Post your comment

Subject:
Message:
0/1000 characters