How to access resources, eg use a resource image
C#, Graphics and Images, Win Forms February 22nd, 2006In Visual Studio 2005, (im not sure about other versions), simply choose properties on the Assembly and add the Resources you need under the resource tab.
In the class file you want to access the resources in, add a using statement
[csharp]using MyProject.Properties;[/csharp]
You can now access the resources in code by using the static Resource class.
[csharp]MyGraphics.DrawImage(Resources.MyImageResourceName, new Point(0,0));[/csharp]
Recent Comments