PictureBox pictureBox1 = new PictureBox(); pictureBox1.Image = Image.FromFile("image.jpg");
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
byte[] imageData = // get image data from a server or file MemoryStream ms = new MemoryStream(imageData); pictureBox1.Image = Image.FromStream(ms);Overall, the System.Windows.Forms.PictureBox is a useful class for displaying images in Windows Forms applications. It is part of the .NET Framework and can be found in the System.Windows.Forms namespace.