
July 6th, 2003, 01:53 AM
|
|
Contributing User
|
|
Join Date: Nov 2001
Location: USA
Posts: 312
Time spent in forums: 3 h 27 m 43 sec
Reputation Power: 7
|
|
Well I found the solution on www.gotdotnet.com. Thought if I posted it here other may be able to use it as well.
PHP Code:
Dim stFileName As String
Dim openFileDialog1 As New OpenFileDialog
openFileDialog1.InitialDirectory = System.Environment.CurrentDirectory
openFileDialog1.Title = "Open Text File"
openFileDialog1.Filter = "Text files (*.txt)|*.txt"
openFileDialog1.FilterIndex = 1
openFileDialog1.RestoreDirectory = True
If openFileDialog1.ShowDialog() = DialogResult.OK Then
Dim stFilePathAndName As String = openFileDialog1.FileName
Dim MyFile As FileInfo = New FileInfo(stFilePathAndName)
stFileName = MyFile.Name
End If
MessageBox.Show("Your File Info: " & vbCrLf & vbCrLf & _
"File Path and Name: " & stFilePathAndName & vbCrLf & vbCrLf & _
"File Name: " & stFileName, _
"File Info", _
MessageBoxButtons.OK, _
MessageBoxIcon.Information)
|