O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.10. Using a Picture Box to View Images

So far in our sample applications, we have used a form as the drawing surface for images. You can also use a PictureBox control to view images. Picture boxes are easy to use, and this control optimizes the rendering process with a built-in double buffering feature. A picture box is recommended for viewing (but not manipulating) images when you know the exact size of the image.

The PictureBox class is defined in the System.Windows.Forms namespace. The Image property, which takes an Image object, sets the image to the picture box that you want to display. You can also set the position and clipping, using the SizeMode property. SizeMode, which is of type PictureBoxSizeMode enumeration, specifies how an image ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required