Estoy hacieno una pequeña aplicacion la cual dibuja sobre un picturebox (PLANTA), solo hace lineas segun presiones con el mouse, y circulos en los extremos, mi pregunta es ¿como puedo hacer para poder reconocer los circulos del picturebox?
es decir, que pueda hacer click sobre ellos, como para desendacdenar algun evento o algo.
El codigo e el siguiente
Código:
Desde ya muchas gracias Private Sub PLANTA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PLANTA.Click
pt1 = PLANTA.PointToClient(Control.MousePosition)
vxp1 = pt1.X
vyp1 = pt1.Y
If count1 = 0 Then
vxp2 = pt1.X
vyp2 = pt1.Y
x2.Text = vxp2
y2.Text = vyp2
count1 = count1 + 1
End If
x1.Text = vxp1
y1.Text = vyp1
' Asignamos la referencia hacia donde queremos dibujar.
Dim g As Graphics = PLANTA.CreateGraphics
'Circulo
Dim ci As Graphics = PLANTA.CreateGraphics
Dim myBrush As New Pen(Color.Red)
' El elemento a usar(lapiz), y el color
Dim myPen As New Pen(Color.White)
myPen.Width = 1
' Dibujamos
g.DrawLine(myPen, vxp1, vyp1, vxp2, vyp2)
'circulo
ci.DrawEllipse(myBrush, vxp1 - 5, vyp1 - 5, 10, 10)
vxp2 = vxp1
vyp2 = vyp1
End Sub

