Solved

Program not in task list

Posted on 1997-11-14
8
147 Views
Last Modified: 2010-04-04
Hello people,

is it possible to create a delphi 3 program, wich doesn't appear in the tasklist when ctrl-alt-del is pressed. ?

Thanx
0
Comment
Question by:mories
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 

Expert Comment

by:almiller
ID: 1350396
No. Every thing running under windows is displayed in the task list, even windows' programs it self, such as the Explorer, and systray etc...

A program not displayed int he task list, would have to not be registered under windows.
0
 
LVL 7

Expert Comment

by:ahalya
ID: 1350397
btw, What constitutes a "tasklist" ?

if you're referring to the list obtained by pressing [ctrl][alt][del] then you CAN hide an app from that list.

0
 
LVL 1

Author Comment

by:mories
ID: 1350398
yes i do mean that list,

how can i hide it ??
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Accepted Solution

by:
ahalya earned 100 total points
ID: 1350399
Hi Mories,
i'm surprised that you have classified this as an "easy" question :-). Anyway, here goes the answer.

you do that by calling the "RegisterServiceProcess" function in Kernel32 DLL.

function declaration goes like this:
(put it just after 'implementation')

function RegisterServiceProcess (ThreadID : THandle; Flags : Integer): Integer; stdcall; external kernel32 name 'RegisterServiceProcess';

in your form create event call the function like this:

ok := RegisterServiceProcess (0, 1);
if ok  = 0 then ShowMessage ('Error Hiding from task list')

0
 
LVL 1

Author Comment

by:mories
ID: 1350400
Adjusted points to 100
0
 
LVL 7

Expert Comment

by:ahalya
ID: 1350401
Hi Mories,

you didn't have to adjust the points :-)
i'm not getting anything out of this !

anyway enjoy delphi !

0
 
LVL 1

Author Comment

by:mories
ID: 1350402
i think it was worth it.

i needed this one..

Thanx
0
 
LVL 7

Expert Comment

by:ahalya
ID: 1350403
since you're being nice, here is some more info:


you can call RegisterServiceProcess with a parameter of 0 the remove it from being a service. for e.g.
you can do

RegisterServiceProcess (0, 1) to hide from the task list and
RegisterServiceProcess (0, 0) to show your program again in the task list.

the first parameter indicates the handle of the process; (0 indicates the calling process)





0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question