Solved

invisible application

Posted on 1998-12-26
7
145 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
Technology Partners: 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

631 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