PictureBox.ImageLocation Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om