Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim OpenDLG As New OpenFileDialog
- OpenDLG.Filter = "Text Files (*.txt)|*.txt|All Files|*.*"
- OpenDLG.Title = "Open File"
- OpenDLG.InitialDirectory = "C:\"
- OpenDLG.RestoreDirectory = True
- DialogResult = OpenDLG.ShowDialog
- If DialogResult = Windows.Forms.DialogResult.OK Then
- Dim objreader As New System.IO.StreamReader(OpenDLG.FileName)
- TextBox1.Text = objreader.ReadToEnd
- objreader.Close()
- Me.Text = "Notepad | " + OpenDLG.FileName
- Label1.Text = OpenDLG.FileName.ToString()
- ElseIf DialogResult = Windows.Forms.DialogResult.Cancel Then
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement