Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

How to hide an app at at startup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MJB - 30 Mar 2006 16:46 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.