Page 1 of 1
Listview Freezed
Posted: Sun Sep 15, 2013 11:30 am
by Dummy1912
who has a solution for listview data loading.
because it seems that the listview stuck and then loads the data i have searched and searched but can't find the solution.
i even added
but didn't do a thing.
Re: Listview Freezed
Posted: Sun Sep 15, 2013 12:19 pm
by Shim
do you parse the data?
Re: Listview Freezed
Posted: Sun Sep 15, 2013 1:13 pm
by Dummy1912
? what you mean
Re: Listview Freezed
Posted: Sun Sep 15, 2013 1:17 pm
by Shim
I have seen people parse the data if you're getting the listview items from a database
Re: Listview Freezed
Posted: Sun Sep 15, 2013 1:24 pm
by Dummy1912
no idea about parse but
still you have any idea to avoid the freeze part?
Re: Listview Freezed
Posted: Sun Sep 15, 2013 4:53 pm
by CodenStuff
You will probably need to use a backgroundworker for adding items to the listview.
Re: Listview Freezed
Posted: Sun Sep 15, 2013 5:25 pm
by Dummy1912
#CodenStuff i have tried that but got a error that said he can't make a new handler because i started already one :(
by accessing the first dataload.
if you have any demo sample for 3 data loads
i love to hear

Re: Listview Freezed
Posted: Mon Sep 16, 2013 7:40 am
by Dummy1912
it seems every time we resized the form
the listview freezed to resize the columns
so anyone has a solution please.
Re: Listview Freezed
Posted: Mon Sep 16, 2013 8:40 am
by XTechVB
Dummy1912 wrote:it seems every time we resized the form
the listview freezed to resize the columns
so anyone has a solution please.
Create a new class and inherit
ListView then write this code inside
Code: Select all#Region "Constructor"
Public Sub New()
Me.SetStyle(ControlStyles.OptimizedDoubleBuffer Or ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.EnableNotifyMessage, True)
End Sub
#End Region
#Region "Reduce Flickering"
Protected Overrides Sub OnNotifyMessage(ByVal m As Message)
If m.Msg <> &H14 Then
MyBase.OnNotifyMessage(m)
End If
End Sub
#End Region
I had to translate this from C# but it should work with VB too, also even though this code will reduce flickering and i believe freezing too, it will not fix the problem completely.
Re: Listview Freezed
Posted: Mon Sep 16, 2013 10:17 am
by Dummy1912
hi #XTechVB
seems it don't change a thing :(