0

I'm using WPF and I want to use NotifyIcon from WinForms. My icon image is located in <project_folder>/Resources/icon.ico. It has Build action set to Resource. But this code: this.ni.Icon = new System.Drawing.Icon("pack://application:,,,/Resources/icon.ico"); throws me an exception: The given path's format is not supported.

What's the problem? How can I solve it?

Kolan
  • 103
  • 1
  • 5
  • 1
    possible duplicate of [How do I use an icon that is a resource in WPF?](http://stackoverflow.com/questions/74466/how-do-i-use-an-icon-that-is-a-resource-in-wpf) – Rhys Aug 05 '15 at 13:45
  • possible duplicate of [Accessing resources from code for setting NotifyIcon.Icon](http://stackoverflow.com/questions/20374060/accessing-resources-from-code-for-setting-notifyicon-icon) – Glen Thomas Aug 05 '15 at 15:50

0 Answers0