?
Solved

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.

Posted on 2005-03-28
8
Medium Priority
?
979 Views
Last Modified: 2010-05-18
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!
0
Comment
Question by:TheRookie32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 13649410
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
 
LVL 6

Author Comment

by:TheRookie32
ID: 13658204
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
 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 13658846

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 13658922
Have fun with double clicking on the notify icon in the task bar :)
0
 
LVL 6

Author Comment

by:TheRookie32
ID: 13667072
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
 
LVL 19

Accepted Solution

by:
Fahad Mukhtar earned 1500 total points
ID: 13669501
>>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
 
LVL 6

Author Comment

by:TheRookie32
ID: 13673281
How could i get teh text to displlay when the user hovers his mouse over the icon?  
0
 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 13677889
Set notifyIcon1.Text Property to the Text Property of your main Form or any other Text
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question