Solved

ListView flicker

Posted on 2004-04-29
5
457 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 52

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
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…

734 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