我正在尝试显示我已检入数据的所有项目,但仅显示一个项目enter image description here
Private Sub Form9_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
'Load data
Dim sReader As New System.IO.StreamReader(Form1.pathAppointments & selectedAppointment & "\appointmentData.txt")
Dim lbData As New ListBox
While sReader.Peek <> -1
lbData.Items.Add(sReader.ReadLine)
End While
sReader.Close()
'Visualise data
lblPatientName.Text = lbData.Items(1)
lblCaseType.Text = lbData.Items(0)
lblDate.Text = lbData.Items(2)
lblMedication.Text = lbData.Items(5)
lblAppointmentFor.Text = lbData.Items(3)
lblLocation.Text = lbData.Items(4)
lblTor.Text = lbData.Items(6)
lbllab.Text = lbData.Items(7)
End Sub