Imports
Public Class Form1
Private Sub writeToListView()
Dim fs As FileStream = New FileStream("E:\fileName.txt", FileMode.Open)
Dim sr As StreamReader = New StreamReader(fs)
Dim str As String = sr.ReadLine()
Dim substr(0, 2) As String
substr(0, 0) = str.Substring(0, str.IndexOf(" ")) '张明
substr(0, 1) = str.Substring(str.IndexOf(" "), str.LastIndexOf(" ") - str.IndexOf(" ") - 1) '1234
substr(0, 2) = str.Substring(str.LastIndexOf(" "), str.Length - str.LastIndexOf(" ")) '19
ListView1.Items.Add(substr(0, 0))
ListView1.Items.Add(substr(0, 1))
ListView1.Items.Add(substr(0, 2))
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call writeToListView()
End Sub
End Class
试过了 好用