Here are directions for embedding a resource such as this in your assembly:
1) Right-click on your project, go to Add, then Existing Item. Select the image file and it will be added to your project tree.
2) Highlight the newly added file, and in the property grid change its BuildAction to Embedded Resource.
3)
(VB) Make a note of your root namespace, set in the project options. You'll need to specify this when extracting the image at runtime.
(C#) Make a note of the default namespace for your project, found in project options. If you place the resource in a subfolder on your project tree you will have to specify that as well.
4) In code, use the following to get the image:
Code:
Dim b As Bitmap
b = New Bitmap(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("MyRootNamespace.logo.jpg"))
Code:
Bitmap b;
b =
new Bitmap
(System.
Reflection.
Assembly.
GetExecutingAssembly().
GetManifestResourceStream("MyDefaultNamespace.logo.jpg"));
5) You can now do what you like to it, including assigning it to a picturebox -
myPictureBox.Image = b