|
-
Nov 29th, 2000, 06:29 AM
#1
Thread Starter
Member
Does anyone know how to remove or hide an application from being Ctrl+Alt+Del outted?
I just want to remove it from that list that appears.
This is my final problem in a program that has been bugging me for days.
regards
M.
-
Nov 29th, 2000, 06:33 AM
#2
Hyperactive Member
Put this code in a module:
Code:
Public Declare Function GetCurrentProcessId _
Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess _
Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess _
Lib "kernel32" (ByVal dwProcessID As Long, _
ByVal dwType As Long) As Long
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0
To remove your app from the list, call this procedure:
Code:
Public Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
To restore your app into the list, call this procedure:
Code:
Public UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, _
RSP_UNREGISTER_SERVICE)
'End Code
Hope this was of help!
-
Nov 29th, 2000, 06:52 AM
#3
Thread Starter
Member
Any ideas why
'
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
'
regserv is invoking a 'Variable not defined' when called at form ini.
Any gems to offer?
Regards
M.
-
Nov 29th, 2000, 06:56 AM
#4
Hyperactive Member
I have no idea, I copied the code from a tip on VB-World...
-
Nov 29th, 2000, 06:57 AM
#5
Thread Starter
Member
At 1.30 am our time (New Zealand) i shall quit coding and go to bed as i am asking dumb questions.
All my hassle over the error in that code was simply caused by my declaration
Dim pid As Long
Dim reserv As Long <---- The culprit should = Dim reGserv.
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE
However all is working now.
And thanks a million for the tip Cyber. Much appreciated as always.
Cheers all and g'night.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|