Solved

Preventing listView from flickering

Posted on 2007-04-10
3
809 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to copy file 14 92
Header Font Size in Grid View 6 51
c#, case, if 4 38
Easiest intro into .NET CORE? 2 33
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

751 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