J
Jake Pearson
Hi,
I am getting an exception when I read in bunch of resources with the
following code:
string fullName = name + ".ico";
Stream stream = assembly.GetManifestResourceStream(fullName);
return new Icon(stream);
The stack trace is as follows:
Unhandled Exception: System.ComponentModel.Win32Exception: Element not
found
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream)
It seems to only happen when I read the same resource again and again.
I was able to fix the error by caching the resource, but I was still
curious why it happens. Any ideas?
thanks,
Jake Pearson
I am getting an exception when I read in bunch of resources with the
following code:
string fullName = name + ".ico";
Stream stream = assembly.GetManifestResourceStream(fullName);
return new Icon(stream);
The stack trace is as follows:
Unhandled Exception: System.ComponentModel.Win32Exception: Element not
found
at System.Drawing.Icon.Initialize(Int32 width, Int32 height)
at System.Drawing.Icon..ctor(Stream stream)
It seems to only happen when I read the same resource again and again.
I was able to fix the error by caching the resource, but I was still
curious why it happens. Any ideas?
thanks,
Jake Pearson