|
-
Apr 12th, 2007, 11:59 AM
#1
Thread Starter
Addicted Member
ListView Cursor
Hi,
I am using Visual Basic 2005 Express Edition
I set in the properties of the ListView the Cursor to Hand.
When the cursor is in the Columns the cursor is not change to Hand.
My question is: If it's possible to change the cursor to Hand?
What i mean is that the Column Header,
The place that you write the caption.
Thanks in advance
Last edited by yulyos; Apr 13th, 2007 at 01:38 AM.
-
Apr 12th, 2007, 12:09 PM
#2
Fanatic Member
Re: ListView Cursor
Try setting the cursor when you enter and exit the listview.
Private Sub ListView_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView.MouseEnter
Me.Cursor = Windows.Forms.Cursors.Hand
End Sub
Private Sub ListView_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView.MouseLeave
Me.Cursor = Windows.Forms.Cursors.Default
End Sub
VB.Net 2008
.Net Framework 2.0
"Must you breathe? 'Cause I need heaven..."
-
Apr 12th, 2007, 12:41 PM
#3
Thread Starter
Addicted Member
Re: ListView Cursor
Hi,
Tannks for your reply
What i mean is that the Column Header,
The place that you write the caption.
It's not change.
-
Apr 12th, 2007, 12:56 PM
#4
Fanatic Member
Re: ListView Cursor
Well, maybe you could use the MouseMove event. That should give you the coordinates of the mouse relative to the listview. Then you just have to know the height of the Column Headers.
Private Sub ListView_MouseMove(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView.MouseMove
if e.Y < 10 'Or whatever the height of the header is
Me.Cursor = Windows.Forms.Cursors.Hand
else
Me.Cursor = Windows.Forms.Cursors.Default
end if
End Sub
Just adjust that 10 to whatever it needs to be. I would guess it actually need to be 17.
VB.Net 2008
.Net Framework 2.0
"Must you breathe? 'Cause I need heaven..."
-
Apr 13th, 2007, 01:38 AM
#5
Thread Starter
Addicted Member
-
Apr 13th, 2007, 10:15 AM
#6
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|