mouse event on picturebox
Posted
by
user548694
on Stack Overflow
See other posts from Stack Overflow
or by user548694
Published on 2010-12-31T12:49:22Z
Indexed on
2010/12/31
12:54 UTC
Read the original article
Hit count: 192
c#
I want to see my pixel coordinates on moviing my mouse on the image in picture box
I have added this event Form.designer.cs this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown); and this method in Form.cs
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) {
locationtxt.Text = e.X.ToString() + "," + e.Y.ToString();
}
but I cann't see anything in textbox on moving my mouse on form runtime.
What should i add further. regards,
© Stack Overflow or respective owner