mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 09:06:04 +02:00
* 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
2.0 KiB
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 |
|
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
-
Draw a xref:System.Windows.Forms.PictureBox control on a form.
-
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.
-
If you're looking for a specific file type (for example, .gif files), select it in the Files of type box.
-
Select the file you want to display.
To clear the picture at design time
- 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.