Work around ListView.Cursor bug - SetCursor fixes content but not header

  • Thread starter Thread starter Samuel R. Neff
  • Start date Start date
S

Samuel R. Neff

I'm using this class to work around the ListView.Cursor bug in .NET
1.0/1.1. It fixes the bug as long as the user mouses around the
client area of the listview but if the listview is in detail view and
the user mouses over the header, the default cursor is displayed
regardless of the Cursor property setting.

Public Class MyListView
Inherits ListView
Const WM_SETCURSOR = &H20
Public Declare Function SetCursor Lib "user32" Alias "SetCursor"
(ByVal
hCursor As IntPtr) As IntPtr
Protected Overrides Sub WndProc(ByRef m As
System.Windows.Forms.Message)
if m.Msg = WM_SETCURSOR
SetCursor(Me.Cursor.Handle)
Return
End If
MyBase.WndProc(m)
End Sub
End Class

From:

http://groups-beta.google.com/group..._frm/thread/945c2ab9c07e990f/c8686bb8f61ccd9f

Is there a better work-around that also handles the header?

Thanks,

Sam
 
Hi Samuel,

So far we have no better workaround for the problem.
Also we are planning to fix the issue in the next vs.net release(Whidbey),
you may try to monitor our website for the release.
Thanks for your understanding!


Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
I read that, but the next major release is still a long ways off..

This requires a fix in the run-time though, right? Not vs.net...

Thanks,

Sam
 
Hi

I am sorry if I did not make this more clear.
Because this is a problem in the current winform control in .net FW
1.1(vs.net 2003), while in the next release Whidbey(.net FW 2.0), the
winform control will also be updated. So the problem is not the VS.NET IDE
but the underlying Framework which provides the listview
control.(system.windows.forms.dll)

If you do have more concern on the workaround, I think you may try to
contact MSPSS for a hotfix.
You may reach MSPSS via the link below.
http://support.microsoft.com


Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top