Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello

i used in wpf tray icon from windows.wi.forms for example named Notify1.
i add to the resources a icon and when i set the Notify1 is icon like this:
C#
Notify1.Icon = new System.Drawing.Icon("icon1.ico");

i get error while debug;

but if i write the full path the error don't accord.
Environment.CurrentDirectory.Replace(@"bin\Debug", "") + @"Resources\Icon1.ico"


why?! and how to fix?

thanks
Posted

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