Results 1 to 18 of 18

Thread: Hidden from WinNt taskmanager

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    mauritius
    Posts
    75
    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?

  2. #2
    Lively Member Owen Holiday's Avatar
    Join Date
    Mar 2001
    Location
    back where I started.
    Posts
    71

    Unhappy ???

    Is yourm opperation system Win 9X or WinNT?

    Owen
    "Programmers by passion, profession and insanity.
    Insane from the irrational, illogical and VB."- ThreeMinds

  3. #3
    Guest
    Try this:


    Code:
    App.TaskVisible = False

  4. #4
    Lively Member Owen Holiday's Avatar
    Join Date
    Mar 2001
    Location
    back where I started.
    Posts
    71

    Unhappy WinNT

    the only problem with that, Matthew Gates, is that it only works on WinNT... I think, well at least not in Win 98.
    "Programmers by passion, profession and insanity.
    Insane from the irrational, illogical and VB."- ThreeMinds

  5. #5
    Guest

    Re: WinNT

    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.


    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?

  6. #6
    Fanatic Member ExtremePimpness's Avatar
    Join Date
    Jan 2001
    Location
    Indianapolis, Indana - USA
    Posts
    550
    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.

  7. #7
    Guest
    For Win98, take a look at this link.
    http://www.vb-world.net/tips/tip135.html

  8. #8
    Lively Member Owen Holiday's Avatar
    Join Date
    Mar 2001
    Location
    back where I started.
    Posts
    71

    Unhappy Oops!

    My bad, I missed that part when I read it... sorry.

    How do you check which version of Windows is running?


    owen h.
    "Programmers by passion, profession and insanity.
    Insane from the irrational, illogical and VB."- ThreeMinds

  9. #9
    Guest
    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

  10. #10
    Fanatic Member ExtremePimpness's Avatar
    Join Date
    Jan 2001
    Location
    Indianapolis, Indana - USA
    Posts
    550
    just a slight change of matts code showing where to put the code
    Code:
    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
    ...
    also you could replace the if...elseif with more select case statements to add more versions without the confusion

    Hope all of this helps you

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    mauritius
    Posts
    75
    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).

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    mauritius
    Posts
    75
    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?

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    mauritius
    Posts
    75
    What about hidding a program other that i've written.
    That is any prewrittten program.Should i send some sort of message to it?

  14. #14
    Fanatic Member ExtremePimpness's Avatar
    Join Date
    Jan 2001
    Location
    Indianapolis, Indana - USA
    Posts
    550
    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

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    mauritius
    Posts
    75
    but is this going to hide the notepad application in the taskmanager if mine can hide?

  16. #16
    Fanatic Member ExtremePimpness's Avatar
    Join Date
    Jan 2001
    Location
    Indianapolis, Indana - USA
    Posts
    550
    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

  17. #17

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    mauritius
    Posts
    75
    thanx anyway.it did teach me a new thing though

  18. #18
    Fanatic Member ExtremePimpness's Avatar
    Join Date
    Jan 2001
    Location
    Indianapolis, Indana - USA
    Posts
    550
    your welcome i just learned how to do it a few hours ago

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width