Imports System
Imports System.Drawing
Imports System.Data
Imports System.IO
Imports System.Collections
Imports System.Windows.Forms
Imports System.Drawing.Printing
Public Class MainClass
Shared Sub Main()
Dim myFileDialog As OpenFileDialog = New OpenFileDialog()
With myFileDialog
.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
.FilterIndex = 1
.InitialDirectory = "C:\"
.Title = "Open File"
.CheckFileExists = False
End With
If myFileDialog.ShowDialog() = DialogResult.OK Then
Console.WriteLine(myFileDialog.FileName)
End If
myFileDialog = Nothing
End Sub
End Class
|