Hi, I Have some problem to add ListBox Item to ArrayList.
can anyone help me what I do wrong?
Code:Dim myStreamReader As StreamReader = File.OpenText(LastFile) 'Last Opened File
Dim intListBoxTabs() As Integer = {80, 180}
Dim intRes As Integer
Dim myInputString As String
Dim t As Task
Dim Prio As Integer
Dim Due As Date
Dim ToDo As String
List.Items.Clear()
intRes = SendMessage(List.Handle, _
LB_SETTABSTOPS, _
intListBoxTabs.Length, _
intListBoxTabs(0))
While myStreamReader.Peek() > -1
myInputString = myStreamReader.ReadLine()
If Not myInputString Is Nothing Then
t = New Task(Prio, Due, ToDo)
tasks.Add(t)
End If
End While
Dim i As Integer
Dim s As String = ""
If tasks.Count > 0 Then
For i = 0 To tasks.Count - 1
't = Split(myInputString, ",")
List.Items.Add(Prio & vbTab & Due & vbTab & ToDo)
Next
End If
tasks.Sort()
myStreamReader.Close()
End Sub
End Class
Thanks
