How do u hide a program from the taskmanager
in WinNT?
I know that u can make it a service program but
isn't there a smpler way?
Printable View
How do u hide a program from the taskmanager
in WinNT?
I know that u can make it a service program but
isn't there a smpler way?
Is yourm opperation system Win 9X or WinNT?
Owen
Try this:
Code:App.TaskVisible = False
the only problem with that, Matthew Gates, is that it only works on WinNT... I think, well at least not in Win 98.
Quote:
Originally posted by Owen Holiday
the only problem with that, Matthew Gates, is that it only works on WinNT... I think, well at least not in Win 98.
That is what lavalchung asked for though.
Quote:
Originally posted by lavalchung
How do u hide a program from the taskmanager
in WinNT?
I know that u can make it a service program but
isn't there a smpler way?
just write a case statement to see whichoperating system they use and disable it for that OS. It only takes a few more lines of code.:D
For Win98, take a look at this link.
http://www.vb-world.net/tips/tip135.html
My bad, I missed that part when I read it... sorry.
How do you check which version of Windows is running?
owen h.
Code:'constants returned by OperatingSystem
Const Windows95 As Integer = 95
Const Windows98 As Integer = 98
Const WindowsNT3 As Integer = 3 'v3.51
Const WindowsNT4 As Integer = 4
Private Type OSVersionInfo
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformID As Long
szCSDVersion As String * 128
End Type
Private Declare Function GetVersionExA Lib "kernel32" (lpVersionInformation As OSVersionInfo) As Integer
Private Function OperatingSystem() As Integer
Dim OSInfo As OSVersionInfo
Dim RetValue As Integer
OSInfo.dwOSVersionInfoSize = 148
OSInfo.szCSDVersion = Space$(128)
RetValue = GetVersionExA(OSInfo)
With OSInfo
Select Case .dwPlatformID
Case 1
If .dwMinorVersion = 0 Then
OperatingSystem = Windows95
ElseIf .dwMinorVersion = 10 Then
OperatingSystem = Windows98
End If
Case 2
If .dwMajorVersion = 3 Then
OperatingSystem = WindowsNT3
ElseIf .dwMajorVersion = 4 Then
OperatingSystem = WindowsNT4
End If
Case Else
OperatingSystem = 0
End Select
End With
End Function
Private Sub Form_Load()
Print OperatingSystem
End Sub
just a slight change of matts code showing where to put the code
also you could replace the if...elseif with more select case statements to add more versions without the confusion:DCode:Private Declare Function GetVersionExA Lib "kernel32" (lpVersionInformation As OSVersionInfo) As Integer
Private Function OperatingSystem() As Integer
Dim OSInfo As OSVersionInfo
Dim RetValue As Integer
OSInfo.dwOSVersionInfoSize = 148
OSInfo.szCSDVersion = Space$(128)
RetValue = GetVersionExA(OSInfo)
With OSInfo
Select Case .dwPlatformID
Case 1
If .dwMinorVersion = 0 Then
OperatingSystem = Windows95
'disable it here
ElseIf .dwMinorVersion = 10 Then
OperatingSystem = Windows98
'disable here
End If
Case 2
If .dwMajorVersion = 3 Then
OperatingSystem = WindowsNT3
'disable here
ElseIf .dwMajorVersion = 4 Then
OperatingSystem = WindowsNT4
'disable here
End If
Case Else
OperatingSystem = 0
End Select
End With
End Function
...
Hope all of this helps you :)
thanks guys i'll try it but not today coz i'm having a test in OO programing. damned!!
as for win98 u can check if it's win 98 n if it's then use the api RegisterServiceProcess or something like that.
(sorry i don't remember the api name).
why do most of the email programs in winsock using the smtp don't realy works?
i've downloaded some from program-source-code.com but none is working .
i'm using a wrong smtp server?
What about hidding a program other that i've written.
That is any prewrittten program.Should i send some sort of message to it?
you can set properties fo open windows using api for instance if you wanted to make an open noptepad a mdi of your form you could use this(Originally posted by Matthew Gates)
Code:'Originally Posted by Matthew Gates
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private Declare Function SetParent Lib "user32" (ByVal _
hWndChild As Long, ByVal hWndNewParent As Long) As _
Long
Private Sub Form_Load()
Dim NotePad As Long
NotePad = FindWindow("notepad", vbNullString)
If NotePad <> 0 Then
SetParent NotePad, Me.hWnd
End If
End Sub
but is this going to hide the notepad application in the taskmanager if mine can hide?
It should but this is just an example of how you can manipulate open windows there should be a call that you can change the property of the window so that it won't be visible but i don't know the api call hopefully what i posted can help someone else help you though
thanx anyway.it did teach me a new thing though
your welcome i just learned how to do it a few hours ago:D