Tuesday, August 4, 2009

Assigning Images to Windows Controls

Use a Bitmap or Image class.
button1.BackgroundImage = new Bitmap("bm.jpg");
// or
pictureBox1.BackgroundImage = Image.FromFile("bm.jpg");


More Info: MSDN: Image Class