Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ListView flicker

Posted on 2004-04-29
5
Medium Priority
?
460 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
[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
5 Comments
 
LVL 53

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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

715 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