My subject should be self explanitory. Basically I used App.TaskVisible = False in an app to remove it from the task manager, works great in xp and noticed it doesn't work in Win9X. ?
'Declarations
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
'This is in the form
Public Sub MakeAsService()
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
'To restore your application to the Ctrl+Alt+Delete list, call the
'UnMakeAsService Procedure:
Public Sub UnMakeAsService()
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, _
RSP_UNREGISTER_SERVICE)
End Sub
In your code you mention a form. This is from VBHelp:
The TaskVisible property can only be set to False in applications that do not display an interface, such as ActiveX components that do not contain or display Form objects. While the application displays an interface, the TaskVisible property is automatically set to True
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Hmmm, well maybe I am putting it in the wrong place, I put it in the form load event, and I even tried placing it in a timer so that the action was delayed a few seconds in case WIn98SE was doing something weird.
I just tried it again and again, and no workee :-(
As I said, this is a FRESH install, nothing else has touched this machine and it is only for testing, I also use GoBack to keep the machine set to the new install. Here is the machines tag:
Microsoft Windows 98
Second Edition
4.10.2222 A
Any ideas? I mean this should be working?
App.TaskVisible = False
Is there a declation I am missing? I don't think so because it works fine in xp and 200 to hide the app fromt he task manager.
This came off PLante Source Code, is this possible?
"If you want to make it so your app
can't be killed from any task manager
at all (but will still show up in
them), just have 2 apps - your main
one, and a second one. The second one
should check if the main one's running
and if not, run it. The main should do
the same to the second one. Since you
can't kill 2 apps at the same time,
this works well. (I know because many
security programs I've defeated do
this."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.