eruj
asked on
Hiding application
Hi,
how can i prevent my delphi application from be displayed anywhere (nor in the taskbar or in the current running tasks list - the box which shows up when in win95/98 you press CRT+ALT+DELETE).
Thanx
how can i prevent my delphi application from be displayed anywhere (nor in the taskbar or in the current running tasks list - the box which shows up when in win95/98 you press CRT+ALT+DELETE).
Thanx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
IMHO,
Put Timer in your main form, set its interval to 500, and in TimerEvent do Form.Hide ...
Does it work ? :)
Put Timer in your main form, set its interval to 500, and in TimerEvent do Form.Hide ...
Does it work ? :)
Place this line right before the form is created.
frmMain.ShowMainForm = false;
frmMain.ShowMainForm = false;
Oops, now that I look again:
Application.ShowMainForm := false;
Application.CreateForm(... );
Application.ShowMainForm := false;
Application.CreateForm(...
in object inspector you can also set
visible := false for form1.
visible := false for form1.
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(dwP rocessID,d wType : DWORD) :
DWORD; stdcall; external 'KERNEL32.DLL';
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterServiceProcess(Get CurrentPro cessID,1);
end;
procedure TForm1.FormActivate(Sender : TObject);
var
w: hwnd;
begin
showwindow(form1.handle,sw _hide);
w:=findwindow('tapplicatio n',nil);
showwindow(w,sw_hide);
{To Totally go Invisible} //Your missing this
end;
end.
But yeah i agree with Barry, Set your main form to be invisible.... form1.visible:=False; on show or activate.... but this will do it....
Craig C.
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(dwP
DWORD; stdcall; external 'KERNEL32.DLL';
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterServiceProcess(Get
end;
procedure TForm1.FormActivate(Sender
var
w: hwnd;
begin
showwindow(form1.handle,sw
w:=findwindow('tapplicatio
showwindow(w,sw_hide);
{To Totally go Invisible} //Your missing this
end;
end.
But yeah i agree with Barry, Set your main form to be invisible.... form1.visible:=False; on show or activate.... but this will do it....
Craig C.
Or you could use a comp called Stealth that is on
www.torrys.com
www.torrys.com
to hide a form i would set
form1.height:=50
form1.top:=-100
or does that trigger other problems?
form1.height:=50
form1.top:=-100
or does that trigger other problems?
Listening...
hello...
a response would be good...
a response would be good...
listenning
Listening
ASKER
your code works perfectly for hiding the app from the taskbar and current running tasks list, but the main form is still visible. Any suggestions on how to hide it?