Board index » delphi » Hiding programs from task list

Hiding programs from task list

Hi everybody,

I am writing a clock application and I want it to be visible in the
system tray but not in the task list or the taskbar. The system tray
part already works fine, but I can't find a way to remove the program
from the taskbar.

--
Koen Van Baelen
koen.van.bae...@pandora.be
http://users.pandora.be/koen.van.baelen
--

 

Re:Hiding programs from task list


Im not sure if you can use it, but check out the
Application.ShowMainForm method!
Quote
Koen Van Baelen wrote in message <37B27E1B.F4EBA...@pandora.be>...
>Hi everybody,

>I am writing a clock application and I want it to be visible in the
>system tray but not in the task list or the taskbar. The system tray
>part already works fine, but I can't find a way to remove the program
>from the taskbar.

>--
>Koen Van Baelen
>koen.van.bae...@pandora.be
>http://users.pandora.be/koen.van.baelen
>--

Re:Hiding programs from task list


Quote
Lasse Holm <l...@dps.dk> wrote in message

news:7ouehq$sqd$1@news.inet.tele.dk...

Quote
> Im not sure if you can use it, but check out the
> Application.ShowMainForm method!

> Koen Van Baelen wrote in message <37B27E1B.F4EBA...@pandora.be>...
> >Hi everybody,

> >I am writing a clock application and I want it to be visible in the
> >system tray but not in the task list or the taskbar. The system tray
> >part already works fine, but I can't find a way to remove the program
> >from the taskbar.

> >--
> >Koen Van Baelen
> >koen.van.bae...@pandora.be
> >http://users.pandora.be/koen.van.baelen
> >--

Hi,

the Application.ShowMainForm property really works, but only as long as
the main form is hidden. When it appears, a button in the taskbar also
appears. Besides, I found that simply hiding the main form (without
using Application.ShowMainForm) also hides the taskbar button and the
application from the task-list. But how to prevent a taskbar button from
appearing when the main form appears? I suspect that a Windows API call
will be needed. According to the documentation I have, to prevent a
taskbar button from appearing we can either create the window with the
WS_EX_TOOLWINDOW style, or to create a hidden window that will be the
owner of the main window. Unfortunately, no matter how hard I've tried
so far, nothing worked out.

Regards,

bye.

Re:Hiding programs from task list


On Mon, 16 Aug 1999 03:47:56 +0200, "Krasimir Kiryakov"
<kras...@techno-link.com> waffled on about something:

Quote
>Lasse Holm <l...@dps.dk> wrote in message
>news:7ouehq$sqd$1@news.inet.tele.dk...
>> Im not sure if you can use it, but check out the
>> Application.ShowMainForm method!

>> Koen Van Baelen wrote in message <37B27E1B.F4EBA...@pandora.be>...
>> >Hi everybody,

>> >I am writing a clock application and I want it to be visible in the
>> >system tray but not in the task list or the taskbar. The system tray
>> >part already works fine, but I can't find a way to remove the program
>> >from the taskbar.

>> >--
>> >Koen Van Baelen
>> >koen.van.bae...@pandora.be
>> >http://users.pandora.be/koen.van.baelen
>> >--

>Hi,

>the Application.ShowMainForm property really works, but only as long as
>the main form is hidden. When it appears, a button in the taskbar also
>appears. Besides, I found that simply hiding the main form (without
>using Application.ShowMainForm) also hides the taskbar button and the
>application from the task-list. But how to prevent a taskbar button from
>appearing when the main form appears? I suspect that a Windows API call
>will be needed. According to the documentation I have, to prevent a
>taskbar button from appearing we can either create the window with the
>WS_EX_TOOLWINDOW style, or to create a hidden window that will be the
>owner of the main window. Unfortunately, no matter how hard I've tried
>so far, nothing worked out.

>Regards,

>bye.

Do these 2 do the job?

ShowWindow(Application.Handle, SW_Hide);   { Hide from Taskbar }
ShowWindow(Application.Handle, SW_Restore);  { Restore to Taskbar }

Dodgy

Re:Hiding programs from task list


Hi,

Your code puzzled me at first (why are you resorting to Windows API
calls???), but I almost fell off my seat when I tried it and it
worked!!! The taskbar button really disappears and appears and at the
same time the form remains visible. But still the application is not
hidden from the task list (Alt+Tab). But I think it is not right to have
a visible form that will not be
accessible even through Alt+Tab, so everything seems fine. Frankly
speaking, I would have never tried to "hide" the application!!!
Congratulations, and best regards. Bye.

Krasimir Kiryakov.

Other Threads