Re:Hiding an application
On 16 Aug 1997 14:21:40 GMT, "gajo" <g...@eunet.yu> wrote:
Quote
>Does anybody knows how to hide an application so its icon wouldent be shown
>on the Taskbar?
*******
Quote
On Sun, 03 Aug 1997 20:34:41 GMT, phr...@dds.nl.nospam (Phranc) wrote:
>Hello,
>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
>VB).
<snip>
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
taskbar:
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 (trayicon.zip on the DSP) and together with
this code it works just fine.
Phranc
=================
The optimist thinks this is the best of all possible worlds.
The pessimist fears it is true.
=================
http://huizen.dds.nl/~phranc