Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Hiding an application from the Tasklist

Hiding an application from the Tasklist

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ron Russell
    wrote on last edited by
    #1

    I have seen several articles on various sites about how to prevent an application from showing on the taskbar. Can anyone point me at some information on how to hide an application from the tasklist as well?

    L 1 Reply Last reply
    0
    • R Ron Russell

      I have seen several articles on various sites about how to prevent an application from showing on the taskbar. Can anyone point me at some information on how to hide an application from the tasklist as well?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This is a fragment of VB code I've found on the Internet. It is simple to understand and to port it to VC++. I didn't write this code, but I've tried it, and it works! The author is Andrew Thomas This is the original URL : http://www.visual-statement.com/vb/Tips/dsk16.txt By: Andrew Thomas To hide your application from the task list, you must register your program as a service. This is done by passing the process ID of your application to the RegisterService API. Declarations Copy the following code into the declarations section of a module: 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 Procedures To remove your program from the Ctrl+Alt+Delete list, call the MakeMeService procedure: Public Sub MakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE) End Sub To restore your application to the Ctrl+Alt+Delete list, call the UnMakeMeService procedure: Public Sub UnMakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE) End Sub Don't forget to unregister your application as a service before it closes to free up system resources by calling UnMakeMeService.

      R 1 Reply Last reply
      0
      • L Lost User

        This is a fragment of VB code I've found on the Internet. It is simple to understand and to port it to VC++. I didn't write this code, but I've tried it, and it works! The author is Andrew Thomas This is the original URL : http://www.visual-statement.com/vb/Tips/dsk16.txt By: Andrew Thomas To hide your application from the task list, you must register your program as a service. This is done by passing the process ID of your application to the RegisterService API. Declarations Copy the following code into the declarations section of a module: 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 Procedures To remove your program from the Ctrl+Alt+Delete list, call the MakeMeService procedure: Public Sub MakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE) End Sub To restore your application to the Ctrl+Alt+Delete list, call the UnMakeMeService procedure: Public Sub UnMakeMeService() Dim pid As Long Dim reserv As Long pid = GetCurrentProcessId() regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE) End Sub Don't forget to unregister your application as a service before it closes to free up system resources by calling UnMakeMeService.

        R Offline
        R Offline
        Ron Russell
        wrote on last edited by
        #3

        Thank you for your response, but I am sorry I was not clearly describing what I am trying to do in my last post. I am looking for a way, on Windows NT, to hide an application's icon from the ALT+TAB list. If anyone knows how this can be accomplished, I would appreciate the information. Ronald L. Russell Jr. (Ron) rrussell@ygrest.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups