Results 1 to 3 of 3

Thread: Hidden Application...

  1. #1

    Thread Starter
    Lively Member nateobot's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Minnesota
    Posts
    71

    Hidden Application...

    How can i make my program not show up in the TaskManager? Is this possible? If so can someone point me in the right direction?


    Thanks
    -nate

  2. #2
    Member
    Join Date
    Nov 2001
    Location
    Berlin
    Posts
    44
    Yeah, it's possible. Try something like this:

    Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long

    RegisterServiceProcess GetCurrentProcessId(), 1

    I got this code from PSC and used it once. I don't remember if it worked or not. Maybe I'll find my app.....but try it anyway. I think if you want your app to show again, change 1 to 0, far as I recall.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. 'for Win9x
    2. Private Const RSP_SIMPLE_SERVICE = 1
    3. Private Const RSP_UNREGISTER_SERVICE = 0
    4.  
    5. Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    6. Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
    7.  
    8. Private Sub HideApp()
    9.     Dim process As Long
    10.     process = GetCurrentProcessId()
    11.     Call RegisterServiceProcess(process, RSP_SIMPLE_SERVICE)
    12. End Sub
    13.  
    14. 'for WinNT
    15. Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
    16. Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
    17. Public Const GW_OWNER = 4
    18. Public Const SW_HIDE = 0
    19. Public Const SW_SHOW = 5
    20.  
    21. 'Hide the app from the task manager.
    22. Public Sub HideApp(ByVal mainFrmHwnd As Long)
    23.     Dim lRtn As Long    
    24.     lRtn = GetWindow(mainFrmHwnd, GW_OWNER)
    25.     lRtn = ShowWindow(lRtn, SW_HIDE)
    26. End Sub

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