Solved

Preventing listView from flickering

Posted on 2007-04-10
3
805 Views
Last Modified: 2012-06-27
Hello,

I'm adding a lot of items to a listView in a loop.

How can I prevent it from flickering?

Thank you.
0
Comment
Question by:i950
3 Comments
 
LVL 11

Accepted Solution

by:
Babycorn-Starfish earned 500 total points
ID: 18885529
Hi,

try calling BeingUpdate() before you start adding the items and then EndUpdate() once you've finised.
0
 
LVL 9

Expert Comment

by:ripahoratiu
ID: 18897962
SuspendLayout()
Resume or PerformLayout()
DoubleBuffered = true or
SetStyle() and check for ControlStyles that may help (AllPaintingInWmPaint, OptimizedDoubleBuffer )
0
 
LVL 1

Expert Comment

by:Manjesh
ID: 18937195
LockWindowUpdate(Listbox.handle); // from GDI   use PInvoke
....
update
.....
LockWindowUpdate( NULL );
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now