This documentation is archived and is not being maintained.
FileDialogCustomPlacesCollection Class
Visual Studio 2008
Represents a collection of Windows Vista custom places for the FileDialog class.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example demonstrates how to use the FileDialogCustomPlacesCollection. To run this example, paste the following code into a Windows Form and call InitializeDialogAndButton from the form's constructor or Load event-handling method.
Private openFileDialog1 As OpenFileDialog Private WithEvents button1 As Button Private Sub InitializeDialogAndButton() Me.openFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.button1 = New System.Windows.Forms.Button() Me.button1.Location = New System.Drawing.Point(53, 37) Me.button1.AutoSize = True Me.button1.Text = "Show dialog with custom places." Me.button1.UseVisualStyleBackColor = True Me.Controls.Add(Me.button1) End Sub Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) _ Handles button1.Click ' Add Pictures custom place using GUID. openFileDialog1.CustomPlaces.Add("33E28130-4E1E-4676-835A-98395C3BC3BB") ' Add Links custom place using GUID openFileDialog1.CustomPlaces.Add(New FileDialogCustomPlace _ (New Guid("BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968"))) ' Add Windows custom place using file path. openFileDialog1.CustomPlaces.Add("c:\Windows") openFileDialog1.ShowDialog() End Sub
System.Object
System.Collections.ObjectModel.Collection(Of FileDialogCustomPlace)
System.Windows.Forms.FileDialogCustomPlacesCollection
System.Collections.ObjectModel.Collection(Of FileDialogCustomPlace)
System.Windows.Forms.FileDialogCustomPlacesCollection
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: