tags:

views:

236

answers:

1

If I have a form Frm1.cs that is using some icons, images or other resources, these resources get stored in the form's resx file (Frm1.resx).

My simple question is how do I access these resources from code?

As a workaround I can store these resources in the Project resource file and they will be available via Properties.Resources.resourcename. However, similar syntax does not work for the resources stored in the form's resource file.

While searching for a solution I have come across several references to ResourceManager class but was not able to find a way to use that to access the form's resources...

+1  A: 

Google search found this, http://www.sellsbrothers.com/writing/ResourcesAndWinForms.htm

Jonathan
The last example from this link worked for me... the funny thing is that I tried pretty much the exact same thing but must have passed a typo to the GetObject method...One thing I don't like about this solution is that you have to cast from object and pass a simple string.If no one posts a better solution will mark this as the answer... thanks.
kzen