title: How to handle click event on shapes of System.Drawing
body: <p>i've been trying to reach the following result in a winforms vb.net application</p>
  
  <p><a href="https://i.stack.imgur.com/ZD6Bf.png" rel="nofollow noreferrer">Desired Result</a></p>
  
  <p>where each arc or circle in this image is clickable , 
  clickable arc is colored in pink.</p>
  
  <p>i managed to write the following code</p>
  
  <pre><code>Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
  
      'Create pen objects 
      Dim p As New Pen(Color.Green, 30)
      Dim p1 As New Pen(Color.Yellow, 30)
      Dim p2 As New Pen(Color.Red, 30)
      Dim p3 As New Pen(Color.Blue, 30)
  
      'Create rectangle objects 
      Dim rt As New Rectangle(160, 150, 80, 100)
      Dim rt1 As New Rectangle(100, 150, 80, 100)
      Dim rt2 As New Rectangle(130, 120, 80, 100)
      Dim rt3 As New Rectangle(130, 180, 80, 100)
  
      'Draw arcs 
      e.Graphics.DrawArc(p, rt, 45, -90)
      e.Graphics.DrawArc(p1, rt1, -135, -90)
      e.Graphics.DrawArc(p2, rt2, -45, -90)
      e.Graphics.DrawArc(p3, rt3, 135, -90)
  
  End Sub
  </code></pre>
  
  <p>that resulted the following output .</p>
  
  <p><a href="https://i.stack.imgur.com/jIPHh.png" rel="nofollow noreferrer">Output</a></p>
  
  <p>what i didn't figure out is :</p>
  
  <p>1- how to make a border for each of the arcs.</p>
  
  <p>2- how to handle clicks on each of the arcs.</p>
  
  <p>is there any better way than the way i'am trying to pull this off.</p>
  
  <p>any help would be appreciated .</p>