H
Hany Metry
Guest
Private Sub picturebox1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
Dim Pty As Integer = CInt((e.Y - PictureBox1.Location.Y - (PictureBox1.Height / 2)) * (2000 / ((0.97 * PictureBox1.Height))))
Dim Ptx As Integer = CInt((e.X - PictureBox1.Location.X - (PictureBox1.Width / 2)) * (2000 / ((0.97 * PictureBox1.Height))))
ToolStripStatusLabel1.Text = ("X = " & Ptx & " mm")
ToolStripStatusLabel2.Text = ("Y = " & Pty & " mm")
Hi,
The above code is to write the coordinates of X axis and Y axis in status strip while seeing the coordinate after run the application, the Y coordinates was wrong, Please advice
I have a menu strip at the top of the form and picture box and menu strip at the top.
Kind Regards,
Hany Metry
Continue reading...
Dim Pty As Integer = CInt((e.Y - PictureBox1.Location.Y - (PictureBox1.Height / 2)) * (2000 / ((0.97 * PictureBox1.Height))))
Dim Ptx As Integer = CInt((e.X - PictureBox1.Location.X - (PictureBox1.Width / 2)) * (2000 / ((0.97 * PictureBox1.Height))))
ToolStripStatusLabel1.Text = ("X = " & Ptx & " mm")
ToolStripStatusLabel2.Text = ("Y = " & Pty & " mm")
Hi,
The above code is to write the coordinates of X axis and Y axis in status strip while seeing the coordinate after run the application, the Y coordinates was wrong, Please advice
I have a menu strip at the top of the form and picture box and menu strip at the top.
Kind Regards,
Hany Metry
Continue reading...