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 OpenFileDialog and SaveFileDialog classes allow you to add folders to the CustomPlaces collection.
Note
In order for a custom place to appear in the OpenFileDialog or SaveFileDialog, the AutoUpgradeEnabled 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 FileDialogCustomPlace object to the CustomPlaces 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");
See also
.NET Desktop feedback
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor