Advertisement
NeverPool

Open File Dialog

May 31st, 2011
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.47 KB | None | 0 0
  1.         Dim AllText As String = "", Lineoftext As String = ""
  2.         OpenTxt.ShowDialog()
  3.         If OpenTxt.FileName <> "" Then
  4.  
  5.         End If
  6.         Try
  7.             FileOpen(1, OpenTxt.FileName, OpenMode.Input)
  8.             Do Until EOF(1)
  9.                 Lineoftext = LineInput(1)
  10.                 AllText = AllText & Lineoftext & vbCrLf
  11.             Loop
  12.             txtBox.Text = AllText
  13.         Catch
  14.         Finally
  15.             FileClose(1)
  16.         End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement