Flicker free updating listview from threads?? 
Author Message
 Flicker free updating listview from threads??

I have an app that has several worker threads. Each thread is represented by
a row in a listview to show progress for the thread. The problem is that the
listview flickers a lot.

I have tried every possible way of updating the ListViewItem for each
thread. Calling a delegate directly, calling a delegate via Invoke & also
BeginInvoke, and even passing a reference to the ListViewItem to the thread
and updating it directly. None of these seem to make a difference. It
doesn't matter how I update the ListViewItem, it still flickers.

Any ideas to get rid of the flicker? How to other apps go about this? I've
seen this type of thing in many apps (for example, Napster, Kazaa, and many
p2p apps show progress of worker threads in ListViewItems, no flicker there)

My plans now are to make a custom listview so I can get to the protected
SetStyles method and set it to DoubleBuffer. Is the the right approach?
--

-Ryan



Mon, 13 Dec 2004 07:33:09 GMT  
 Flicker free updating listview from threads??


Quote:
> I have an app that has several worker threads. Each thread is represented
by
> a row in a listview to show progress for the thread. The problem is that
the
> listview flickers a lot.

> I have tried every possible way of updating the ListViewItem for each
> thread. Calling a delegate directly, calling a delegate via Invoke & also
> BeginInvoke, and even passing a reference to the ListViewItem to the
thread
> and updating it directly. None of these seem to make a difference. It
> doesn't matter how I update the ListViewItem, it still flickers.

> Any ideas to get rid of the flicker? How to other apps go about this? I've
> seen this type of thing in many apps (for example, Napster, Kazaa, and
many
> p2p apps show progress of worker threads in ListViewItems, no flicker
there)

> My plans now are to make a custom listview so I can get to the protected
> SetStyles method and set it to DoubleBuffer. Is the the right approach?

Perhaps you could have all the threads set a member variable and have
a seperate thread that updates the listview. I suppose that one thread
won't cause all the flicker, but I don't know for sure. It's worth
a shot.

-c



Mon, 13 Dec 2004 08:00:30 GMT  
 Flicker free updating listview from threads??
Bummer. I tried that. Still flickers. Basically I held the progress details
in properties and then had a seperate process that read those properties
from each thread and updated the listview on a given interval. No
difference, still get the flicker.

--

-Ryan



Quote:
> I have an app that has several worker threads. Each thread is represented
by
> a row in a listview to show progress for the thread. The problem is that
the
> listview flickers a lot.

> I have tried every possible way of updating the ListViewItem for each
> thread. Calling a delegate directly, calling a delegate via Invoke & also
> BeginInvoke, and even passing a reference to the ListViewItem to the
thread
> and updating it directly. None of these seem to make a difference. It
> doesn't matter how I update the ListViewItem, it still flickers.

> Any ideas to get rid of the flicker? How to other apps go about this? I've
> seen this type of thing in many apps (for example, Napster, Kazaa, and
many
> p2p apps show progress of worker threads in ListViewItems, no flicker
there)

> My plans now are to make a custom listview so I can get to the protected
> SetStyles method and set it to DoubleBuffer. Is the the right approach?

Perhaps you could have all the threads set a member variable and have
a seperate thread that updates the listview. I suppose that one thread
won't cause all the flicker, but I don't know for sure. It's worth
a shot.

-c



Tue, 14 Dec 2004 08:16:21 GMT  
 Flicker free updating listview from threads??
You can try to do it the way gameprogrammers do it.

Make 2 ListViewItems, you update on the hidden control, and then switch
the two ListViewItems. Im not sure if this works in .net, but I have
done this with success i VB6.

Lars Andre

Quote:

> Bummer. I tried that. Still flickers. Basically I held the progress details
> in properties and then had a seperate process that read those properties
> from each thread and updated the listview on a given interval. No
> difference, still get the flicker.

> --

> -Ryan





>>I have an app that has several worker threads. Each thread is represented

> by

>>a row in a listview to show progress for the thread. The problem is that

> the

>>listview flickers a lot.

>>I have tried every possible way of updating the ListViewItem for each
>>thread. Calling a delegate directly, calling a delegate via Invoke & also
>>BeginInvoke, and even passing a reference to the ListViewItem to the

> thread

>>and updating it directly. None of these seem to make a difference. It
>>doesn't matter how I update the ListViewItem, it still flickers.

>>Any ideas to get rid of the flicker? How to other apps go about this? I've
>>seen this type of thing in many apps (for example, Napster, Kazaa, and

> many

>>p2p apps show progress of worker threads in ListViewItems, no flicker

> there)

>>My plans now are to make a custom listview so I can get to the protected
>>SetStyles method and set it to DoubleBuffer. Is the the right approach?

> Perhaps you could have all the threads set a member variable and have
> a seperate thread that updates the listview. I suppose that one thread
> won't cause all the flicker, but I don't know for sure. It's worth
> a shot.

> -c



Sun, 02 Jan 2005 20:00:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. flicker free update

2. Solution to ListView flicker

3. ListView SetItemCount Flicker

4. Flicker and ListView

5. Update On TaskBar Buttons Flickering Problem

6. Screen flicker when updating ListCtrl items

7. Fast List Control (Flicker Free and High Performance)

8. Transparent control and flicker-free drawing...

9. Flicker-free drawing of HTML Control

10. flicker free controls

11. Flicker-free animation routine crashes

12. Flicker free custom drawn control on dialog possible?

 

 
Powered by phpBB® Forum Software