473,383 Members | 1,843 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,383 software developers and data experts.

ListView Cursor changing & flickering

179 100+
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 back to what I asked it to be.

I'm trying to isolate this flicker/changing to the hand cursor but can't figure out where it's occuring or how to stop it. To replicate this...

1) Create a form with a ListView on it.
2) Add an image list and some images. Set the view to the large icon mode.
3) Add some items to the ListView.

Add a MouseMove event to the ListView:

Expand|Select|Wrap|Line Numbers
  1.       private void listView1_MouseMove(object sender, MouseEventArgs e)
  2.         {
  3.             ListViewItem selected = this.listView1.GetItemAt(e.X, e.Y);
  4.             if (selected == null)
  5.             {
  6.                 base.Cursor = Cursors.Default;
  7.             }
  8.             else
  9.             {
  10.                 base.Cursor = Cursors.No;
  11.             }
  12.         }
  13.  
Execute the app, moving the mouse over an item. You should see the cursor flickering between the No (no entry cursor) and the finger pointer when you're over an item. The question is how to ensure it just displays the No cursor and to not flicker. (C# .NET).

I've tried override both OnMouseMove and OnMouseHover to returning to ensure these don't set anything. I've also tried overriding the Cursor property and saying 'only set to default or no cursors' and that didn't work either.

Any help's appreciated.

Ian
Feb 27 '09 #1
0 1954

Sign in to post your reply or Sign up for a free account.

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)....
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...
1
by: Riccardo Giomi | last post by:
Hi I would to display a Cursors.WaitCursor on a ListView control, so I tried listView.Cursor = Cursors.WaitCursor but it doesn't work at all, I see always the default cursor. The same thing...
2
by: John Lee | last post by:
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...
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...
0
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...
1
by: luigidavinci | last post by:
I am using Scriptaculous to achieve a pretty simple and straightforward effect. I need a couple of images and text to fade in and fade out periodically, which I already managed to do it using...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.