Solved

Preventing listView from flickering

Posted on 2007-04-10
3
804 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
Comment Utility
Hi,

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

Expert Comment

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

Expert Comment

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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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

12 Experts available now in Live!

Get 1:1 Help Now