* 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
1.7 KiB
title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
| title | ms.date | dev_langs | helpviewer_keywords | ms.assetid | |||||
|---|---|---|---|---|---|---|---|---|---|
| How To: Add a Custom Place to a File Dialog Box | 03/30/2017 |
|
|
63f6469b-59cd-40f6-9e61-8b5831856780 |
How To: Add a Custom Place to a File Dialog Box
The default open and save dialog boxes on Windows Vista have an area on the left side of the dialog box titled Favorite Links. This area is called custom places. The xref:System.Windows.Forms.OpenFileDialog and xref:System.Windows.Forms.SaveFileDialog classes allow you to add folders to the xref:System.Windows.Forms.FileDialog.CustomPlaces%2A collection.
Note
In order for a custom place to appear in the xref:System.Windows.Forms.OpenFileDialog or xref:System.Windows.Forms.SaveFileDialog, the xref:System.Windows.Forms.FileDialog.AutoUpgradeEnabled%2A property must be set to
true(the default).
To add a custom place to a file dialog box
-
Add a path, a Known Folder GUID, or a xref:System.Windows.Forms.FileDialogCustomPlace object to the xref:System.Windows.Forms.FileDialog.CustomPlaces%2A collection of the dialog box.
The following code example shows how to add a path:
OpenFileDialog1.CustomPlaces.Add("C:\MyCustomPlace")openFileDialog1.CustomPlaces.Add("C:\\MyCustomPlace");