I have to build a graph digitizer to make the user have a graph by points from an image. This could be an example of an imported graph
What I'd like is that the user graphically defines, at first, the X axis domain (in the picture from 0 to 2000) and the Y axis domain (in the picture from 0 to 180) and then picks some points on the curve and, once this procedure has ended, I need to have the points added to a Datagridview that I've already done. Could anyone suggest me where to start?
Edit: I've set the way to store the mouse position, when the mouse button is pressed:
Private Sub PictureBox1_MouseClick(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseClick
If PictureBox1.Image IsNot Nothing Then
Form3.ListBox1.Items.Add(e.X)
End If
End Sub
I need to activate this sub when I press a specified button. Until I press the button, the mouse position, even if clicking inside the picturebox, must not be stored. If tried to put the picturebox sub inside the Button_click sub but It doesn't work.
Another event that I have to program is that - when pressing the mouse button inside the picturebox - on the first click, Form4 must be shown; at the second click, Form5 must be shown; at the third click, Form6 must be shown. From the fourth click (until the user has ended to pick points), the mouse position must be stored.