Solved

Preventing listView from flickering

Posted on 2007-04-10
3
808 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

820 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