System.Windows.Forms.PictureBox.Load C# (CSharp) Method

Load() public method

public Load ( string url ) : void
url string
return void
		public void Load (string url)
		{
			if (string.IsNullOrEmpty (url))
				throw new InvalidOperationException ("ImageLocation not specified.");
			
			image_location = url;
			
			if (url.Contains ("://"))
				using (Stream s = ImageDownload.OpenRead (url))
					ChangeImage (Image.FromStream (s), true);
			else
				ChangeImage (Image.FromFile (url), true);
		}
		

Same methods

PictureBox::Load ( ) : void

Usage Example

 public void SingleImageToShow(string i_ImageURL)
 {
     PictureBox singleImageBox = new PictureBox();
     singleImageBox.Load(i_ImageURL);
     singleImageBox.SizeMode = PictureBoxSizeMode.AutoSize;
     imagesFlowLayoutPanel.Controls.Add(singleImageBox);
 }
All Usage Examples Of System.Windows.Forms.PictureBox::Load