M
Mehmet AVSAR
Hi,
I'm using Resco components for UI enhancement. When setting
Resco.ImageButton's ImageDefault property like below, I get an exception of
NullReferenceException on Bitmap.ctor(). Looking at the stack trace, inner
exception message says "value does not fall within the expected range". And
since the exception occurs on different thread, I cannot catch it.
this.ibSubeGiris.ImageVgaDefault =
((System.Drawing.Image)(resources.GetObject("ibSubeGiris.ImageVgaDefault")));
What's strange is;
- Exception only occurs on Win CE, while it works well on Win Mobile
- I can't get the exception on debug mode. It just pops out when running on
release mode.
After googling a little, I found some check points:
- Is resource namespace different than the executing assembly's namespace.
Nope.
- Is ImageName an empty string. Nope.
- The file ImageName refers to does not exist. Nope.
Since it works well on Win Mobile, I don't think it's an issue about
resources. And the inner exception message (value not in the range) makes me
think that Windows CE handles threads in a different way than Windows
Mobile, and Resco has some bug there. Resco denies.
Any idea is appreciated.
Regards,
Mehmet AVSAR
I'm using Resco components for UI enhancement. When setting
Resco.ImageButton's ImageDefault property like below, I get an exception of
NullReferenceException on Bitmap.ctor(). Looking at the stack trace, inner
exception message says "value does not fall within the expected range". And
since the exception occurs on different thread, I cannot catch it.
this.ibSubeGiris.ImageVgaDefault =
((System.Drawing.Image)(resources.GetObject("ibSubeGiris.ImageVgaDefault")));
What's strange is;
- Exception only occurs on Win CE, while it works well on Win Mobile
- I can't get the exception on debug mode. It just pops out when running on
release mode.
After googling a little, I found some check points:
- Is resource namespace different than the executing assembly's namespace.
Nope.
- Is ImageName an empty string. Nope.
- The file ImageName refers to does not exist. Nope.
Since it works well on Win Mobile, I don't think it's an issue about
resources. And the inner exception message (value not in the range) makes me
think that Windows CE handles threads in a different way than Windows
Mobile, and Resco has some bug there. Resco denies.
Any idea is appreciated.
Regards,
Mehmet AVSAR