Solved

ListView flicker

Posted on 2004-04-29
5
448 Views
Last Modified: 2010-07-27
I am having problems with a ListView flickering whenever I add to it, or change colours of items within the ListView (for highlighting purposes).

Is there any way to prevent this?
0
Comment
Question by:hairybarbarian
5 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 10950440
Try apply LockWindowUpdate  API before and after your process, like:

Private Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Integer) As Integer

then..

..
LockWindowUpdate ListView1.Handle.ToInt32()
'Do your process here..
LockWindowUpdate 0
..

Hope this helps
0
 
LVL 5

Expert Comment

by:tgannetts
ID: 10950444
Use begin and end Update commands on the listview:

me.listview1.BeginUpdate()

'Perform actions
....

me.listview1.EndUpdate()

Tom
0
 
LVL 27

Accepted Solution

by:
Dabas earned 125 total points
ID: 10953462
Hi hairybarbarian:
Bad news.
This question has been asked before (even by myself 500 point question)
Unfortunately no acceptable answer is given (in my case there was no answer at all), and eventually the question gets deleted.
In my opinion it is a M$oft bug. Any change to the listview causes a redraw of the whole grid, which causes the flicker.

Dabas
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

815 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