I am trying to create an icon from a stream like this for example:
System.IO.Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/YourReferencedAssembly;component/YourPossibleSubFolder/YourResourceFile.ico")).Stream;
Then when I try to assign it like this it has no notion of Icon inside Drawing, I tried adding the reference and still nothing:
tbi.Icon = new System.Drawing.Icon(iconStream);
Having this at the top:
using System.Drawing;
Here's the error:
Error 1 The type or namespace name 'Icon' does not exist in the namespace 'System.Drawing' (are you missing an assembly reference?)
Its really puzzling to me, I'd appreciate any ideas on what simple thing I must have forgot to add.
It's likely that your project isn't referencing that assembly.
To fix it:
I'm hoping that should take care of it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With