Environment.SpecialFolder.CommonProgramFiles : Environment « System « VB.Net by API






Environment.SpecialFolder.CommonProgramFiles

  
Imports System.Windows.Forms

public class FolderBrowserDialogProperty
   public Shared Sub Main

        Dim FolderBrowserDialog1 As FolderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog

        With FolderBrowserDialog1
            .RootFolder = Environment.SpecialFolder.CommonProgramFiles
            .SelectedPath = "C:\Temp"
            .ShowNewFolderButton = False
            .Description = "Use the tree below to select a folder:"
        End With

        If FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            Console.WriteLine(FolderBrowserDialog1.SelectedPath)
        End If

   End Sub
End class

   
    
  








Related examples in the same category

1.Environment.CommandLine
2.Environment.CurrentDirectory
3.Environment.Exit
4.Environment.ExitCode
5.Environment.GetCommandLineArgs
6.Environment.GetLogicalDrives
7.Environment.HasShutdownStarted
8.Environment.MachineName
9.Environment.NewLine
10.Environment.OSVersion
11.Environment.ProcessorCount
12.Environment.SpecialFolder.Favorites
13.Environment.StackTrace
14.Environment.SystemDirectory
15.Environment.TickCount
16.Environment.UserDomainName
17.Environment.UserInteractive
18.Environment.UserName
19.Environment.Version
20.Environment.WorkingSet