NotifyIcon

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
 
L

Luuk

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?
 
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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top