[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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)?  
0
mem100
Asked:
mem100
1 Solution
 
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
 
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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now