I need my VB.NET application to start in the system tray and when the user hovers his mouse over it, it displays the info that is on the form.

I am building a small application that tells what user is hooked to the computer, IP address, OS version etc and need for it to start in the system tray.   (Maybe just hide it on startup...)  But i also need for a small menu to display above the icon when the mouse is hovering over it that displays the aforementioned information.  How can this be done?  I also need for a user to be able to right click on it and either maximize it (show the form with the info) or close the program.  Think i have that worked out though...  Thanks in advance!

This is my first question i have asked, is the difficulty too high/low?  too many questions in one?

Cheers!
LVL 6
TheRookie32Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fahad MukhtarDistinguished EngineerCommented:
what you need are two controls:
NotifyIcon -- to display icon in the task bar
ContextMenu -- to display the menu after one right click on that icon

Heres a small app. You can have a look at this example :
http://www.codeproject.com/csharp/trayiconmenu01.asp
0
TheRookie32Author Commented:
How can i get the app to start in the task bar?  Then be able to open it up or close it from the taskbar.
0
Fahad MukhtarDistinguished EngineerCommented:

Add a NotifyIcon Control from the toolbar to the form (notifyIcon1)
Add a ContextMenu Control from the toolbar to the form (contextMenu1)
Set your main Form's ShowInTaskBar Property to False
Set notifyIcon1.ContextMenu Property to contextMenu1 either from the IDE or from code
Set notifyIcon1.Text Property to the Text Property of your main Form
Set a propert Icon for the notifyIcon1.Icon Property
In the DoubleClick Event of  notifyIcon1 write:

            Me.ShowInTaskbar = Not Me.ShowInTaskbar
            If Not Me.ShowInTaskbar Then
                  Me.Visible = False
                                 Else : Me.WindowState = FormWindowState.Normal
            End If

In your form's load event write:
Me.WindowState = FormWindowState.Minimized


0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Fahad MukhtarDistinguished EngineerCommented:
Have fun with double clicking on the notify icon in the task bar :)
0
TheRookie32Author Commented:
Thanks for your help!  Any idea how to get a small menu to appear over the icon if the user has their mouse over it that displays the forms info?  Also can it be opened straight to the taskbar and not minimized on startup?

Cheers!
0
Fahad MukhtarDistinguished EngineerCommented:
>>Any idea how to get a small menu to appear over the icon if the user has their mouse over it that displays the forms info?
a menu cant be displayed (only text can be displayed)... you to display a menu on right click by adding menuitems to the contextmenu that you have added earlier.

>>Also can it be opened straight to the taskbar and not minimized on startup?
Set your main Form's ShowInTaskBar Property to True

In your form's load event write:
Me.WindowState = FormWindowState.Normal
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TheRookie32Author Commented:
How could i get teh text to displlay when the user hovers his mouse over the icon?  
0
Fahad MukhtarDistinguished EngineerCommented:
Set notifyIcon1.Text Property to the Text Property of your main Form or any other Text
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.