Please could someone help me with the code required to access resources in a res file
-
Hi, Iam just starting to try and use resource files to embed images and icons rather than have them as files that need to be available when running the application. I have tried many different examples of code in my application but can not get any of them to work. The best I have managed is to create the resource file, add some code to the application and compile it without error, when I try to run it I get a : Application has generated an exception that could not be handled error every time. Please could someone point me in the right direction. I have created a 'MyRes.rs' file with the following text : MyResImage1 IMAGE Image1.jpg MyResIcon ICON MyIcon.ICO used rc.exe to build the res file and that created a 'MyRes.RES' file The trouble now is that I do not know how to access the resourse in my application to, for example: use the Image1.jpg in an image list use the MyIcon.ICO as an icon for the application in the status bar Please could someone help (example code, or pointers to example code, would be very helpfull as I am fairly new to C# programming) Thank you Paul -- modified at 15:25 Wednesday 12th October, 2005