NotifyIcon

  • Thread starter Thread starter gervaz
  • Start date Start date
G

gervaz

Hi all, I need to show a notify icon in my program, but the following
code snippet doen not work... any idea why?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestNotify
{
class Program
{
static void Main(string[] args)
{
System.Windows.Forms.NotifyIcon notify = new
System.Windows.Forms.NotifyIcon(new
System.ComponentModel.Container());
notify.BalloonTipText = "Hello";
notify.BalloonTipTitle = "System Watcher";
notify.Visible = true;
notify.ShowBalloonTip(10000);
}
}
}

Keep in mind that the NotifyIcon is the only UI, so nothing will
subclass System.Windows.Forms.

Thanks,
Mattia
 
Hi all, I need to show a notify icon in my program, but the following
code snippet doen not work... any idea why?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestNotify
{
class Program
{
static void Main(string[] args)
{
System.Windows.Forms.NotifyIcon notify = new
System.Windows.Forms.NotifyIcon(new
System.ComponentModel.Container());
notify.BalloonTipText = "Hello";
notify.BalloonTipTitle = "System Watcher";
notify.Visible = true;
notify.ShowBalloonTip(10000);
}
}
}

Keep in mind that the NotifyIcon is the only UI, so nothing will
subclass System.Windows.Forms.

Thanks,
Mattia

on:
http://msdn.microsoft.com/en-us/library/system.windows.forms.notifyicon.aspx#Y2166

i read:
Notes for NotifyIcon
Please note that for the NotifyIcon to show up, it requires the icon to
be set. If there it no icon, it will be show up, and will not fill in a
blank icon.

maybe that is your problem?
 
Hi all, I need to show a notify icon in my program, but the following
code snippet doen not work... any idea why?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestNotify
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Windows.Forms.NotifyIcon notify = new
System.Windows.Forms.NotifyIcon(new
System.ComponentModel.Container());
            notify.BalloonTipText = "Hello";
            notify.BalloonTipTitle = "System Watcher";
            notify.Visible = true;
            notify.ShowBalloonTip(10000);
        }
    }
}
Keep in mind that the NotifyIcon is the only UI, so nothing will
subclass System.Windows.Forms.
Thanks,
Mattia

on:http://msdn.microsoft.com/en-us/library/system.windows.forms.notifyic....

i read:
Notes for NotifyIcon
Please note that for the NotifyIcon to show up, it requires the icon to
be set. If there it no icon, it will be show up, and will not fill in a
blank icon.

maybe that is your problem?

Thanks. Setting the icon resolved my problem.

Mattia
 
Back
Top