Dim ofd As New OpenFileDialog Dim dir As String dir = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) ofd.Filter = "All Files(*.*)|*.*|All files (*.*)|*.*" ofd.FilterIndex = 2 ofd.InitialDirectory = dir If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then MsgBox(ofd.FileName) End If
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then MsgBox(Path.GetFileName(ofd.FileName)) End If
Dim ofd As New OpenFileDialog Dim dir As String dir = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) ofd.Filter = "All Files(*.*)|*.*|All files (*.*)|*.*" ofd.FilterIndex = 2 ofd.InitialDirectory = dir If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then MsgBox(Path.GetFileName(ofd.FileName)) End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)