David,
Thanks for the reply. I have it working but now I'm having another related issue. The user control I built is compiled in a dll. In another project I am using this library and creating a user control based on that original control. In design mode everthing works fine. The .jpg's show fine, etc. I have the problem when I drop the new user control on a form. I get the error "Object reference not set to an instance of an object". The code is the same as you posted: Bitmap bmp = new Bitmap(this.GetType(),"InspectionForm.gif");
If I take the original control and drop it on a form it works fine. I guess inheriting is causing the issue.
Any ideas?
Thanks,
Dan
>I have been using code like this in an event handler on the form to get to those embedded resources:
>
>Bitmap bmp = new Bitmap(this.GetType(),"InspectionForm.gif");
>
>P.S. This article from Chris Sells pretty well tells you everything you need to know about resources on winforms:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms02202003.asp>
>>I've add some .jpg's to my project as an "embedded resource". I'm running into some problems using those.
>>
>>I'm not sure what to type to use for the "class to extract the resouce" in my Bitmap contructor.
>>
>>Any help would be appreciated.
>>
>>Thanks,
>>Dan