Board index » delphi » Hiding an application

Hiding an application

Look in - from Berdan Delumpa's Delphi Corner under Past
Tips and Manipulating Forms at Run-Time


Re:Hiding an application

On 16 Aug 1997 14:21:40 GMT, "gajo" <g...@eunet.yu> wrote:

>Does anybody knows how to hide an application so its icon wouldent be shown
>on the Taskbar?


On Sun, 03 Aug 1997 20:34:41 GMT, (Phranc) wrote:
>I am looking for a way to hide the icon from the tasbar. The reason is
>that i have a program that has to stay in the tray and must not appear
>in the traybar even if i maximize the main form. I want the program
>only to appear in the tray.
>In VB it was easy; only set the "ShowInTaskbar" to false. I tried in
>Delphi ShowWindow (FrmMain.Handle, SW_HIDE) and that works (the main
>form is invisible at startup), but ShowWindow (Applicaion.Handle,
>SW_HIDE) doesn't work. The icon still appears in the taskbar.
>Who has the solution for my problem? If possible, post some code,
>cause i'm new to Delphi (and i definately don't want to go back to


Well, it appears that things have changed in Delphi 3. If you include
the following code before the form appears, it gets hidden from the

SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);

Still use ShowWindow (FrmMain.Handle, SW_HIDE) to hide the form on
your screen.

And i want to thank Pete Ness for this solution! He has a nice vcl for
an icon in the taskbar ( on the DSP) and together with
this code it works just fine.


The optimist thinks this is the best of all possible worlds.
The pessimist fears it is true.

Other Threads