blah blah blah is here! blah blah » Close

up0down
link

Please help me to solve this problem :

I have 2 treeview and 2 listview
The first treeview show a directory structure just like in explorer window.
and the second treeview show another directory structure from remote computer.

if i click a directory in the first treeview then in the first listview will list all of the files which located in that directory and the same action i gave to the second treeview and listview, but the problem is after clicking the first treeview the other listview (the second listview) got refreshed and i got a blank (second) listview.

Thank you.

last answered one year ago

1 answers

up0down
link

I'm going to assume your using C# Win-forms?

You could try enabling double buffering on your Win-form to see if that gets rid of it.

To set up automatic double buffering for a Form, you would use the following line of code in the constructor, after the InitializeComponent method call.

C#

this.SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);

VB

me.SetStyle(
ControlStyles.AllPaintingInWmPaint OR _
ControlStyles.UserPaint OR _
ControlStyles.DoubleBuffer,true)

Thank you Mr pikkie_Greg but sadly the list view keep flickering

Feedback