By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,771 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,771 IT Pros & Developers. It's quick & easy.

How to hide an app at at startup

P: n/a
MJB

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/de...sinception.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
Mar 30 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
> 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?

Mar 30 '06 #2

P: n/a
MJB
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?

PIEBALD wrote:
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?

Mar 30 '06 #3

P: n/a

"MJB" <mb*@email.com> kirjoitti
viestissä:uh**************@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>
Mar 30 '06 #4

P: n/a
MJB
Ahh, it was the hide from taskbar that did the trick.

Thanks!

orrowMan wrote:
"MJB" <mb*@email.com> kirjoitti
viestissä:uh**************@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>

Mar 30 '06 #5

P: n/a
Don't show it.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"MJB" <mb*@email.com> wrote in message
news:uh**************@TK2MSFTNGP11.phx.gbl...

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/de...sinception.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

Mar 30 '06 #6

P: n/a
> 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?
Mar 30 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.