InertiaM
Well-known member
I have a form with no controls, but with lots of circles drawn on it. I would like to be able to display a tooltip when the mouse is moved over any of the circles.
This code doesnt work properly, but it gives an idea of what I am trying to achieve.
The user can zoom in on the circles, so my plan is to keep track of the circle location and sizes at all times.
Screenshot for information
Any pointers / suggestions would be greatly appreciated
This code doesnt work properly, but it gives an idea of what I am trying to achieve.
VB.NET:
Private Sub frmMain_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
With e.Graphics
.TranslateTransform(50, 50)
.ScaleTransform(2.3, 2.3)
'DrawCircles()
End With
End Sub
Private Sub frmMain_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
Dim tt As New ToolTip
If e.Location.X >= 0 AndAlso e.Location.X <= 50 AndAlso e.Location.Y >= 0 AndAlso e.Location.Y <= 50 Then
tt.SetToolTip(CType(sender, System.Windows.Forms.Control), "Top left!!")
End If
End Sub
The user can zoom in on the circles, so my plan is to keep track of the circle location and sizes at all times.
Screenshot for information
Any pointers / suggestions would be greatly appreciated