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

x
?
Solved

invisible application

Posted on 1998-12-26
7
Medium Priority
?
150 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 200 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

705 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