I have an application that I need to hide at startup in the system tray.
I found this article on how to do it:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbts
ksettingformtobeinvisibleatitsinception.asp
The problem with this method is that when I call the Hide() function on
f1 it causes the form to close which exits the app. Any other
approaches to hiding the form at startup would be appreciated.
Thanks
PIEBALD - 30 Mar 2006 17:16 GMT
> I have an application that I need to hide at startup in the system tray.
Ummm... then why have an interface at all?
By "at startup" do you mean system startup or application startup?
Is the desired result to have the program running without the user knowing it?
MJB - 30 Mar 2006 17:28 GMT
It is a service monitoring/controller app. It starts up via the Start
up folder. Why display it on the desktop when it can be tucked nicely
in the System Tray until the user needs it? Any ideas?
>> I have an application that I need to hide at startup in the system tray.
>
[quoted text clipped - 3 lines]
>
> Is the desired result to have the program running without the user knowing it?
PIEBALD - 30 Mar 2006 17:47 GMT
> It is a service monitoring/controller app. It starts up via the Start
> up folder. Why display it on the desktop when it can be tucked nicely
> in the System Tray until the user needs it? Any ideas?
Ah, then you don't mean to put it in the System Tray and then hide it as the
original post implied?
SorrowMan - 30 Mar 2006 17:32 GMT
"MJB" <mb2@email.com> kirjoitti
viestissä:uhRjiEBVGHA.4976@TK2MSFTNGP11.phx.gbl...
> I have an application that I need to hide at startup in the system tray.
Wouldn't it work if you do:
- set your application form WindowState from properties to to minimized
- use notifyIcon and set it on form LOAD event to something
That way application form should start minimized.
And if you want hide app from taskbar, just set form property ShowInTaskbar
to false, but REMEMBER to set
this.WindowState = FormWindowState.Normal;
on notifyIcon click or dblclick event or something..
<snip>
MJB - 30 Mar 2006 17:41 GMT
Ahh, it was the hide from taskbar that did the trick.
Thanks!
orrowMan wrote:
> "MJB" <mb2@email.com> kirjoitti
> viestissä:uhRjiEBVGHA.4976@TK2MSFTNGP11.phx.gbl...
[quoted text clipped - 15 lines]
>
> <snip>
Kevin Spencer - 30 Mar 2006 17:44 GMT
Don't show it.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
> I have an application that I need to hide at startup in the system tray. I
> found this article on how to do it:
[quoted text clipped - 4 lines]
>
> Thanks