Hi
How can I get the (x,y) coordinates of the mouse cursor when I click within a PictureBox???
Printable View
Hi
How can I get the (x,y) coordinates of the mouse cursor when I click within a PictureBox???
Try using the MouseDown Event
Code:
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
...
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
MessageBox.Show(e.X.ToString() + " " + e.Y.ToString());
}