Dim myFile
As System.IO.File
Dim FileStream
As System.IO.Stream
Dim MyStreamReader
As System.IO.StreamReader

FileStream = myFile.OpenRead(FileName) <-------這裏的FileName是要讀取的檔名

MyStreamReader =
New System.IO.StreamReader(FileStream, System.Text.Encoding.Default)
Dim RecLine
As String = MyStreamReader.ReadLine
While Not (RecLine
Is Nothing) <------一次一行的讀,直到讀不到為止

‥‥‥

‥‥‥ <-------請加入自己想作的處理

RecLine = MyStreamReader.ReadLine
End While