-
Hi,
I have a simple VB app written in VB6. I have this compiled to an exe. When I run it, it appears in the Task Manager. Is there any way of stopping it from appearing here, so that it is hidden to any users who run this exe?
Thanks for any help,
Russ
-
Try this:
Code:
Private Declare Function GetCurrentProcessId _
Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess _
Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As _
Long) As Long
Private Const RSP_SIMPLE_SERVICE = 1
Public Sub MakeMeService()
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
-
Thanks for your help Matthew. Unfortunately the code doesn't work. I suspect it's because I'm running on Windows 2000, and the function can't see GetCurrentProcessID in Kernel32. I've had a look in the API Viewer on my system, and I can't see anything similar. Do you have any other suggestions?
If not, thanks for your help anyway.
Russ
-
Hi,
Try this:
Code:
App.TaskVisible = False
Hope this helps ;)
Shaun