isnoend2001
asked on
How to change the mouse icon in col in a mshflexgrid
I have a column of links that can be clicked and want the mouse pointer to turn to a finger
Private Sub FlxGrd_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
If Index = 2 Then
With FlxGrd(2)
If .Row > 0 And .Col = 0 Then
'change Mouse Icon here
Else
'default MouseIcon for other cols rows
End If
End With
End If
End Sub
how to do this?
Private Sub FlxGrd_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
If Index = 2 Then
With FlxGrd(2)
If .Row > 0 And .Col = 0 Then
'change Mouse Icon here
Else
'default MouseIcon for other cols rows
End If
End With
End If
End Sub
how to do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks that works
ASKER
Didn't realize it at the time, but i have the cursor in a resource file
thanks martinliss
this works
Set .MouseIcon = LoadResPicture(101, vbResCursor), however it is not limited to the first column col(0)
Thanks vb_elmar
I am trying to tweak your code to work, so far no luck
if push comes to shove i will leave the finger and just get the data from first column based on the row clicked
thanks martinliss
this works
Set .MouseIcon = LoadResPicture(101, vbResCursor), however it is not limited to the first column col(0)
Thanks vb_elmar
I am trying to tweak your code to work, so far no luck
if push comes to shove i will leave the finger and just get the data from first column based on the row clicked
however it is not limited to the first column col(0)IIf you change line 5 in my code to
Set.MouseIcon = LoadResPicture(101, vbResCursor)
doesn't it work?
ASKER
Yes it works good, Thank you
But the whole grid is the finger, not just the first column(0)
But the whole grid is the finger, not just the first column(0)
Here is working code. (Substitute your resource cursor)
Private Sub FlxGrd_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
If Index = 2 Then
With FlxGrd(Index)
If x < .CellWidth Then
Set .MouseIcon = LoadPicture("C:\temp\hand.cur")
.MousePointer = vbCustom
Else
.MousePointer = vbNormal
End If
End With
End If
End Sub
ASKER
thanks martinliss
That works i could not get it to work so i had decided put it on the back burner until later
But now i don't have to
That works i could not get it to work so i had decided put it on the back burner until later
But now i don't have to
You're welcome and I'm glad I was able to help.
In my profile you'll find links to some articles I've written (some of them updated recently) that may interest you.
Marty - MVP 2009 to 2014
In my profile you'll find links to some articles I've written (some of them updated recently) that may interest you.
Marty - MVP 2009 to 2014
HAND.txt