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
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