WPF NotifyIcon Help C#

Posted by Sandeep Bansal on Stack Overflow See other posts from Stack Overflow or by Sandeep Bansal
Published on 2010-05-29T16:24:23Z Indexed on 2010/05/29 16:32 UTC
Read the original article Hit count: 553

Filed under:
|
|
|
|

Hi everyone.

I'm having trouble with a NotifyIcon in WPF

I currently have the following:

                    notifyI = new NotifyIcon();
                    notifyI.Icon = new Icon("Power.ico");
                    notifyI.Text = "Shutdown Timer";
                    notifyI.Visible = true;
                    notifyI.MouseDoubleClick += new
                    System.Windows.Forms.MouseEventHandler(notifyI_MouseDoubleClick);

The thing is the notifyI.Icon = new Icon("Power.ico") is keep throwing and exception. I can't seem to find a way to use the icon file I have in the resources, can anyone help.

Thanks, I am using VS2010 and Blend 3.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf