Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remove app from task list

Posted on 1999-06-27
5
Medium Priority
?
136 Views
Last Modified: 2010-04-06
Hi all.

Is there anyway I can remove my app from the active task list (alt-tab)?  I would also like it to be removed from the shutdown list when you press Ctrl-Alt-Del.

Cheers,

Stu.
0
Comment
Question by:SJohnson
[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
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 120 total points
ID: 1384856
Here is example:  (though it works only for 95/98 - NT etc is a much harder task!)

       Cheers,

       Raymond.

           unit Unit1;

           interface

           uses
             Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
             StdCtrls;

           type
             TForm1 = class(TForm)
               Button1: TButton;
               procedure FormDestroy(Sender: TObject);
               procedure FormCreate(Sender: TObject);
             private
               { Private declarations }
             public
               { Public declarations }
             end;

           var
             Form1: TForm1;

           implementation

           {$R *.DFM}
           const
             RSP_SIMPLE_SERVICE = 1;
             RSP_UNREGISTER_SERVICE = 0;

           function  RegisterServiceProcess(dwProcessID,dwType : DWORD) : DWORD;
           stdcall; external 'KERNEL32.DLL';

           procedure TForm1.FormDestroy(Sender: TObject);
           begin
             RegisterServiceProcess(GetCurrentProcessID,RSP_UNREGISTER_SERVICE);
           end;

           procedure TForm1.FormCreate(Sender: TObject);
           begin
             RegisterServiceProcess(GetCurrentProcessID,RSP_SIMPLE_SERVICE);
           end;

           end.
0
 
LVL 1

Author Comment

by:SJohnson
ID: 1384857
Hi Ray,

Although it has removed the entry from the shutdown list, it is still visible when I alt-tab.  Any suggestions?

Stu
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1384858
In the DPR do this... (this should hide the task bar icon and make it disappear from the ALT-TAB list...

begin
  IsLibrary := True;
  Application.Initialize;
  IsLibrary := False

  etc...
end.


Cheers,

Raymond.
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1384859
Another way is to do this:

ShowWindow(Application.Handle, SW_HIDE);

Cheers,

Raymond.

0
 
LVL 1

Author Comment

by:SJohnson
ID: 1384860
Thanks, Ray.  The combination of all your suggestions worked a treat.  Thanks

Stu.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

722 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