remove app from taskbar

I don't want my application to show up on the taskbar. The app is written in delphi 4. Is there a way of removing the app from task manager( for NT& 98)?  
mem100Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rwilson032697Commented:
For Win98 you can do this:


ShowWindow(Application.Handle, SW_HIDE);

for tht ctrl-del-alt thingy here is the code...

Const RSP_SIMPLE_SERVICE = 1;
Const RSP_UNREGISTER_SERVICE = 0;

//hide
RegisterServiceProcess(GetCurrentProcessId, RSP_SIMPLE_SERVICE);
//show
RegisterServiceProcess(GetCurrentProcessId, RSP_UNREGISTER_SERVICE);

this should be able to hide your application completely.... try it out...

For NT its a bit more difficult, you can still do this:

ShowWindow(Application.Handle, SW_HIDE);

to remove the button from the task bar, but to remove from the task manager is very difficult on NT...

Cheers,

Raymond.
0
intheCommented:
Hi
to hide from taskbar:
on form activate event:

ShowWindow(Application.Handle, SW_HIDE);
SetWindowLong(Application.Handle, GWL_EXSTYLE,
  GetWindowLong(Application.Handle, GWL_EXSTYLE)
    or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);

Regards Barry
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwilson032697Commented:
If you are REALLY keen, you might want to read this thread:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=delphi&qid=10186120 

Cheers,

Raymond.
0
craig_capelCommented:
unit Unit1;

interface

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

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

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

var
  Form1: TForm1;

implementation

{$R *.DFM}

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

procedure TForm1.FormActivate(Sender: TObject);
var
  w: hwnd;
begin
 // showwindow(form1.handle,sw_hide);
 // w:=findwindow('tapplication',nil);
 // showwindow(w,sw_hide);

 {To Totally go Invisible}
end;

end.


Ok i think you were waiting for code you could lazely post code straight into your app no?....

Well that will do it under win 9x..

Craig C.
0
mem100Author Commented:
to craig

Post your comment as an answer. the register serviceprocess doesn't work on NT but the rest of code does hide the form and the application from the taskbar
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.