Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42225

VS 2010 Click inside a list of points to return a number

$
0
0
I created a list of points as the first section of my image map. There will eventually be 80+ sections each with their own number value.

If anybody can tell me how to make this particular section return a value of 20 to a label when the mouse is clicked inside the coordinates I laid out, that would be great!

vb.net Code:
  1. Public Class Form1
  2.  
  3.     Public Sub New()
  4.  
  5.         Dim pts As New List(Of PointF)() 's20 big
  6.  
  7.         pts.Add(New PointF(224, 75))
  8.         pts.Add(New PointF(232, 131))
  9.         pts.Add(New PointF(267, 131))
  10.         pts.Add(New PointF(276, 75))
  11.         pts.Add(New PointF(224, 75))
  12.  
  13.         Me.InitializeComponent()
  14.  
  15.         Me.PictureBox1.Image = My.Resources.Dartboard_unlabeled_svg
  16.  
  17.     End Sub
  18.  
  19.     Private Sub PictureBox1_mouseclick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
  20.  
  21.     End Sub
  22.  
  23. End Class

Viewing all articles
Browse latest Browse all 42225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>