Loading an Image from an Embedded Resource in .NET
Disclaimer: The following information is for educational purposes only. Do not use to harass muppets. This is one of those things that I learned to do back when I first started learning .NET, but can never remember how to do when I need it, so I'm adding it here. Hopefully this will come in handy to someone. First, add an image to your project. You can do this by right-clicking on your project in the Solution Explorer and selecting Add->Add Existing Item , then browse for an image file using the dialog that appears. After the image has been added, click on it in the Solution Explorer and set its Build Action to Embedded Resource . Adding images to your project this way is useful for when you deploy your assembly -- it removes the need to distribute individual image files, instead embedding them into your assembly. Next, use the following line of code to load your image from the embedded resource (examples are given in both C# and VB.NET. Please note that the below examples