Files
docs-desktop/dotnet-desktop-guide/framework/winforms/controls/how-to-load-a-picture-using-the-designer-windows-forms.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

2.0 KiB

title, description, ms.date, helpviewer_keywords, ms.assetid
title description ms.date helpviewer_keywords ms.assetid
How to: Load a Picture Using the Designer Learn how to use the Windows Forms PictureBox control to load and display a picture on a form at design time. 03/30/2017
picture formats
images [Windows Forms], displaying on Windows Forms
pictures [Windows Forms], displaying
forms [Windows Forms], displaying images
PictureBox control [Windows Forms], adding pictures
4dc7b973-afb1-4276-8322-20825af96655

How to: Load a Picture Using the Designer (Windows Forms)

With the Windows Forms xref:System.Windows.Forms.PictureBox control, you can load and display a picture on a form at design time by setting the xref:System.Windows.Forms.PictureBox.Image%2A property to a valid picture. The following table shows the acceptable file types.

Type File name extension
Bitmap .bmp
Icon .ico
GIF .gif
Metafile .wmf
JPEG .jpg

To display a picture at design time

  1. Draw a xref:System.Windows.Forms.PictureBox control on a form.

  2. In the Properties window, select the xref:System.Windows.Forms.PictureBox.Image%2A property, then select the ellipsis button to display the Open dialog box.

  3. If you're looking for a specific file type (for example, .gif files), select it in the Files of type box.

  4. Select the file you want to display.

To clear the picture at design time

  1. In the Properties window, select the xref:System.Windows.Forms.PictureBox.Image%2A property. Right-click the small thumbnail image that appears to the left of the name of the image object, and then choose Reset.

See also