Quote:
Originally Posted by Tycoon Ted
Code:
Private Sub frmGraphTT_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover
sender = ChartBox
Dim XYpoint As Point
XYpoint.X = MousePosition.X
XYpoint.Y = MousePosition.Y
'ChartBox.onmousehover(e) - gives a Protected error?
If Cregion.IsVisible(XYpoint.X, XYpoint.Y) = True Then
Debug.Print("1209 hit")
Else
Debug.Print("1216 miss")
End If
End Sub
I have a form with a picturebox called Chartbox and I'm trying to fire a mousehover event when the mouse is over a drawn region (Cregion). My code is not working, can anyone help, please? 
|
For starters
The value of the sender should be assigned to an object
Secondly why are you trying to fire an onmousehover event when you haven't check to see if the box is currently under the mouse
Thirdly you should be using the picture boxes mousehover event to check whether its over a region!
And just to give you a hint look at a special property within the control which converts locations into control locations and stuff!
Goodluck