Advertisement
john_oneill

open

Sep 12th, 2011
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.33 KB | None | 0 0
  1. 'add at top of source codes
  2. Imports System.IO
  3.  
  4.  
  5. 'add on a button
  6. Dim ofd As New OpenFileDialog
  7.         ofd.Title = "select your text file"
  8.         ofd.ShowDialog()
  9.         Dim sr As New StreamReader(ofd.FileName)
  10.         Do While (sr.Peek > -1)
  11.             listbox.items.add = (sr.ReadLine)
  12.         Loop
  13.         sr.Close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement