Hi,
I am getting an exception when I read in bunch of resources with the
following code:
string fullName = name + ".ico";
Stream stream = assembly.GetMan ifestResourceSt ream(fullName);
return new Icon(stream);
The stack trace is as follows:
Unhandled Exception: System.Componen tModel.Win32Exc eption: Element not
found
at System.Drawing. Icon.Initialize (Int32 width, Int32 height)
at System.Drawing. Icon..ctor(Stre am 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.GetMan ifestResourceSt ream(fullName);
return new Icon(stream);
The stack trace is as follows:
Unhandled Exception: System.Componen tModel.Win32Exc eption: Element not
found
at System.Drawing. Icon.Initialize (Int32 width, Int32 height)
at System.Drawing. Icon..ctor(Stre am 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
Comment