Hello everyone, I need small help..
So I got working text file loading to listview, but if file is to big it get whole app stuck untill it load it out... So my question is, is it possible loading with background worker and progress bar?
Here is my current source:
Try
Dim asd As New OpenFileDialog
asd.Title = "Select your combo"
asd.Filter = ("Text Files|*.txt")
asd.ShowDialog()
Dim MyStream As New IO.StreamReader(asd.FileName)
Dim strTemp() As String
Do While MyStream.Peek <> -1
Dim LVItem As New ListViewItem
strTemp = MyStream.ReadLine.Split(":"c)
LVItem.Text = strTemp(0).ToString
ListView1.Items.Add(LVItem)
LVItem.SubItems.Add(strTemp(1).ToString)
If strTemp.Length > 2 Then LVItem.SubItems.Add(strTemp(2).ToString)
Loop
MyStream.Close()
Catch ex As Exception
MessageBox.Show("Error reading file." & ex.Message)
End Try
Also is it possible somehow to remove whole row in listview if some column is emtpy? So like on button click it automatically checks whole list and remove all empty rows ?