473,378 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Listview update flickering problem

Hi,

I have a windows application that uses the listview to display about 50
items in detailed view - 4 columns. The first column is static and other
columns will be updated in 100-1000ms - it looks awful when it's running -
flickering too much!!!

Anyone know how to solve this flickering problem? or how should I deal with
this issue? I see some other C++ app can display more than 100 items without
any flickering in such as speed. Can we achieve the same effect in C#?

Thanks a lot!

John
Nov 16 '05 #1
2 8586
Jay
use following code in the contructor.

// set control styles
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);

regards

Jay
"John Lee" <jo*********@pursca.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have a windows application that uses the listview to display about 50
items in detailed view - 4 columns. The first column is static and other
columns will be updated in 100-1000ms - it looks awful when it's running -
flickering too much!!!

Anyone know how to solve this flickering problem? or how should I deal with this issue? I see some other C++ app can display more than 100 items without any flickering in such as speed. Can we achieve the same effect in C#?

Thanks a lot!

John

Nov 16 '05 #2
Thanks Jay for your response.

I tried your code and it still flickering a lot. To demonstrate it, you can
grab a listview, create 3 columns - name, value, timestamp, in form_load
event to add 50 items into that listview as Item1 - Item49, add a timer to
your windows form, set the timer interval to 100 ms, in the event handler,
add the code to update the value and timestamp

Random r = new Random();
listView1.BeginUpdate();
for (int i = 0; i < 50; i++)
{
listView1.Items[i].SubItems[1] = r.Next(0, 10000).ToString();
listView1.Items[i].SubItems[2] = DateTime.Now().ToLongTimeString();
}
listView1.EndUpdate();

Anyone could make the flickering goes away would be my star!!!! or any other
solution to this fast updating problem?

Thanks in advance!
John
"Jay" <ja*******@gmail.com> wrote in message
news:ud**************@TK2MSFTNGP11.phx.gbl...
use following code in the contructor.

// set control styles
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);

regards

Jay
"John Lee" <jo*********@pursca.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
Hi,

I have a windows application that uses the listview to display about 50
items in detailed view - 4 columns. The first column is static and other
columns will be updated in 100-1000ms - it looks awful when it's
running -
flickering too much!!!

Anyone know how to solve this flickering problem? or how should I deal

with
this issue? I see some other C++ app can display more than 100 items

without
any flickering in such as speed. Can we achieve the same effect in C#?

Thanks a lot!

John


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Joaquin Grech | last post by:
Hi I did alot of research on this on the web and msdn and I couldn't find anything. I have a listview showing as a grid (table looking, with rows and columns and no images at all, only text)....
2
by: Anushya devi | last post by:
Hi All I used listview and tried to update it by using Addrange. When the number of items is less, it works fine.. But I need to update nearly 200,000 items and it hangs. Also i need to add...
9
by: C# Learner | last post by:
Has anyone else noticed ListView's unbearable flickering? I have a project containing a list-view with the following: - View: Details - Columns: 5 The following code causes the list-view...
2
by: John Lee | last post by:
Thanks Jay for your response. I tried your code and it still flickering a lot. To demonstrate it, you can grab a listview, create 3 columns - name, value, timestamp, in form_load event to add 50...
3
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a...
5
by: jtalbot_vizible | last post by:
I was looking at the code on codeproject to solve my listview flickering issue. All the references to functions in the rest of my post refer to that code. It's available at...
1
by: James | last post by:
Hi all, I have made a derived Listview which can accept the controls as items in it. Controls that we are using are Buttons in each row and implemented Grouping with the help of controls(label on...
0
by: James | last post by:
Hi all, I have made a derived Listview in C# .net 1.1 framework, which can accept the controls as items in it. Controls that we are using are Buttons in each row and implemented Grouping with...
0
by: IanWright | last post by:
I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.