Click here to Skip to main content
16,011,815 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Background image problem Pin
13-Dec-00 16:27
suss13-Dec-00 16:27 
GeneralUnusal Visual C++ behavior please help Pin
13-Dec-00 7:20
suss13-Dec-00 7:20 
GeneralRe: Unusal Visual C++ behavior please help Pin
Michael Dunn13-Dec-00 8:00
sitebuilderMichael Dunn13-Dec-00 8:00 
GeneralRe: Unusal Visual C++ behavior please help Pin
Ron Russell13-Dec-00 8:15
Ron Russell13-Dec-00 8:15 
GeneralRe: Unusal Visual C++ behavior please help Pin
13-Dec-00 9:41
suss13-Dec-00 9:41 
GeneralRe: Unusal Visual C++ behavior please help Pin
Ron Russell13-Dec-00 9:53
Ron Russell13-Dec-00 9:53 
GeneralHiding an application from the Tasklist Pin
Ron Russell13-Dec-00 6:14
Ron Russell13-Dec-00 6:14 
GeneralRe: Hiding an application from the Tasklist Pin
13-Dec-00 6:59
suss13-Dec-00 6:59 
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.

GeneralRe: Hiding an application from the Tasklist Pin
Ron Russell13-Dec-00 7:42
Ron Russell13-Dec-00 7:42 
GeneralBackground Image on CListCtrl Pin
Kannan Kalyanaraman12-Dec-00 23:52
Kannan Kalyanaraman12-Dec-00 23:52 
QuestionUpdating Resources under Windows 98/Me???? Pin
12-Dec-00 22:11
suss12-Dec-00 22:11 
QuestionHow to create a window without title bar? Pin
Satervalley12-Dec-00 22:02
Satervalley12-Dec-00 22:02 
AnswerRe: How to create a window without title bar? Pin
Tim Deveaux14-Dec-00 13:27
Tim Deveaux14-Dec-00 13:27 
Questionhow do i make a dialog hidden *before* it gets shown? Pin
12-Dec-00 12:27
suss12-Dec-00 12:27 
AnswerRe: how do i make a dialog hidden *before* it gets shown? Pin
Erik Funkenbusch12-Dec-00 13:25
Erik Funkenbusch12-Dec-00 13:25 
GeneralPortable Encryption API Pin
Alvaro Mendez12-Dec-00 8:15
Alvaro Mendez12-Dec-00 8:15 
GeneralRe: Portable Encryption API Pin
13-Dec-00 7:09
suss13-Dec-00 7:09 
GeneralCalculating Time Pin
12-Dec-00 5:27
suss12-Dec-00 5:27 
GeneralAVIs for CAnimateCtrl Pin
Luis Barreira12-Dec-00 4:00
Luis Barreira12-Dec-00 4:00 
QuestionHow to display elapsing time Pin
leonwoo12-Dec-00 3:52
leonwoo12-Dec-00 3:52 
AnswerRe: How to display elapsing time Pin
NormDroid12-Dec-00 4:50
professionalNormDroid12-Dec-00 4:50 
GeneralCheckboxes in a CListCtrl Pin
12-Dec-00 3:45
suss12-Dec-00 3:45 
GeneralShell hooks in the absence of Explorer.exe Pin
Ron Russell12-Dec-00 3:37
Ron Russell12-Dec-00 3:37 
GeneralRe: Shell hooks in the absence of Explorer.exe Pin
12-Dec-00 18:19
suss12-Dec-00 18:19 
GeneralCORBA Pin
12-Dec-00 1:54
suss12-Dec-00 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.