Uredi

Deli z drugimi prek


PictureBox.ImageLocation Property

Definition

Gets or sets the path or URL for the image to display in the PictureBox.

public:
 property System::String ^ ImageLocation { System::String ^ get(); void set(System::String ^ value); };
public string ImageLocation { get; set; }
public string? ImageLocation { get; set; }
member this.ImageLocation : string with get, set
Public Property ImageLocation As String

Property Value

The path or URL for the image to display in the PictureBox.

Remarks

The property value can be an actual path (for example, "C:\SomeFolder\SomeSubFolder\Picture.jpg"), a relative path ("\SomeSubFolder\Picture.jpg"), or a URL (http://contoso.com/images/Picture.jpg).

If a relative path is used, it will be considered relative to the working directory.

A call to the Load method will overwrite the ImageLocation property, setting ImageLocation to the URL value specified in the method call.

Applies to