Embedded resources
---------------------
TYPE T = this.gettype ();
Icon icon = new icon (t, "iconname.ico");
---------------------
Right click Resource Manager - Add an existing project (add a JPG picture called 123)
Select the picture, set "Generate" to "embedded resources" in the properties column
Code:
System.Reflection.Assembly thisexe; thisexe = system.reflection.Assembly.GetexecutingAssembly ();
// WindowsApplication1 is the namespace of the assembly //123.jpg for the image system.io.stream file = thisexe.getManifestResourceStream ("WindowsApplication1.123.jpg");
This.PictureBox1.Image = image.fromstream (file);