|
-
Oct 2nd, 2000, 06:15 AM
#1
Thread Starter
New Member
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
-
Oct 2nd, 2000, 06:20 AM
#2
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
-
Oct 2nd, 2000, 06:44 AM
#3
Thread Starter
New Member
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
-
Oct 2nd, 2000, 09:43 AM
#4
Addicted Member
Hi,
Try this:
Code:
App.TaskVisible = False
Hope this helps 
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
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
|