Solved

ListView flicker

Posted on 2004-04-29
5
431 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 49

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

17 Experts available now in Live!

Get 1:1 Help Now