Solved

invisible application

Posted on 1998-12-26
7
144 Views
Last Modified: 2010-04-04
How can I make my application absolutly .. invisible (for normal windows usage ofcourse: not in alt+ctrl+del list, not in taskbar, not in alt+tab... and so on)

0
Comment
Question by:skatan187
[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
  • 2
7 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 1353236
to hide app from Ctrl Alt Del:

const
  RSP_SIMPLE_SERVICE = 1;
  RSP_UNREGISTER_SERVICE = 0;

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

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

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

To remove the window from the taskbar:

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

to hide from crtl+tab add
Application.ShowMainForm:=False;
after application.initilize; in .dpr file


0
 
LVL 20

Expert Comment

by:Madshi
ID: 1353237
Perfect answer...   :-)
0
 
LVL 17

Expert Comment

by:inthe
ID: 1353238
im learning and have good teachers eh :-)

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 1

Author Comment

by:skatan187
ID: 1353239
Yep .. it worked !
and that mean.. perfect answer
but I also found a file stealth.pas myself

and eum:



procedure TStealth.HideApplication;
begin
  if not (csDesigning in ComponentState) then
    RegisterServiceProcess(GetCurrentProcessID, 1);
end;

procedure TStealth.ShowApplication;
begin
  if not (csDesigning in ComponentState) then
    RegisterServiceProcess(GetCurrentProcessID, 0);
end;

0
 
LVL 17

Expert Comment

by:inthe
ID: 1353240
csDesigning  eh i never hear that one before
anyway happy new year :-)
Regards Barry
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1353241
Barry,

csDesigning is a flag which you can ask only in components. It tells you in which mode your component is. If you add your component to a form without running your program, csDesigning is set. If the program is run (in Delphi or outside Delphi), it is cleared.

The Stealth code is implemented as a little component, and the csDesigning call makes sure that your application is only hidden when the program really runs, and not when you design the form in Delphi...

Regards and a happy new year... Madshi.
0
 
LVL 17

Expert Comment

by:inthe
ID: 1353242
ah thankyou that could be useful
0

Featured Post

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!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

751 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