Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms
public class OpenFileDialogInitDirectory
public Shared Sub Main
Dim FileDB As New OpenFileDialog()
FileDB.Filter = "All files | *.* | Word files | *.doc | Text files | *.txt"
FileDB.FilterIndex = 3
FileDB.InitialDirectory = "C:\Temp"
If (FileDB.ShowDialog() = DialogResult.OK) Then
Console.WriteLine("File: " & FileDB.FileName)
Else
Console.WriteLine("User selected Cancel")
End If
End Sub
End class