PictureBox::Image Property

 

Gets or sets the image that is displayed by PictureBox.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
[BindableAttribute(true)]
property Image^ Image {
	Image^ get();
	void set(Image^ value);
}

Property Value

Type: System.Drawing::Image^

The Image to display.

The Image property is set to the Image to display. You can do this either at design time or at run time.

System_CAPS_noteNote

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: