Click here to Skip to main content
15,914,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I create a program that will have an icon in the notification area?
I would like to do this in C#.

Thank you!
Posted
Updated 13-Jan-14 4:11am
v2
Comments
Kornfeld Eliyahu Peter 13-Jan-14 9:15am    
Do you mean application with icon in the notification area of Windows?
Did you Googled it?
BillWoodruff 13-Jan-14 9:37am    
Search on CodeProject for the resources here. Come back and ask specific question.

NotifyIcon is only applicable to WinForms - since your previous questions have mostly been web related, I thought I'd better mention that...

Create a WinForms application, and add a NotifyIcon instance onto it by dragging from the ToolBox. Add an icon to the NotifyIcon instance.
Handle the Form.Load event:
C#
private void frmNotifyArea_Load(object sender, EventArgs e)
    {
    myNotifyIcon.BalloonTipText = "Inside the PopUp";
    myNotifyIcon.BalloonTipTitle = "Popup Title";
    myNotifyIcon.ShowBalloonTip(1000);
    WindowState = FormWindowState.Minimized;
    ShowInTaskbar = false;
    }

And the Resize event:
C#
private void frmNotifyArea_Resize(object sender, EventArgs e)
    {
    if (WindowState == FormWindowState.Minimized)
        {
        Hide();
        }
    }

And finally the NotifyIcon.MouseDoubleClick event:
C#
private void myNotifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
    {
    WindowState = FormWindowState.Normal;
    Show();
    }
 
Share this answer
 
Comments
neymar1107 13-Jan-14 10:59am    
very good
thanks
With the NotifyIcon control in Windows Forms, you can add an icon of your own there and hook C# code up to it. Try MSDN-NotifyIcon Class[^]
The NotifyIcon class provides a way to program in this functionality. The Icon property defines the icon that appears in the notification area. Pop-up menus for an icon are addressed with the ContextMenu property.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900