Solved

ListView flicker

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.net threads keep increasing 2 59
"lblTime is not declared" 3 64
FTP recursive download files 5 27
VB.Net Outlook.ReportItem Body Text convert to Readable Characters 5 36
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

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