PictureBox::Image Property
.NET Framework (current version)
Gets or sets the image that is displayed by PictureBox.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The Image property is set to the Image to display. You can do this either at design time or at run time.
Note |
|---|
If you want to use the same image in multiple PictureBox controls, create a clone of the image for each PictureBox. Accessing the same image from multiple controls causes an exception to occur. |
The following code example demonstrates how to create a bitmap at runtime and display it in a PictureBox by setting the Image property. To run this example, paste it into a Windows Form and call CreateBitmapAtRuntime from the form's constructor.
.NET Framework
Available since 1.1
Available since 1.1
Show:
