Hi How can I get the (x,y) coordinates of the mouse cursor when I click within a PictureBox???
razor Software Engineer Student, Aalborg University, Denmark http://www.cs.auc.dk My email at AUC: will get a new email soon My website: http://www.razorsoftware.net Windows XP Pro/ Gentoo Linux (Laptop) Windows XP Pro (Home PC)
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()); }
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()); }
[MindlessAnt.co.uk] [MSDN] [Paging Records With MS SQL] [Virtual CD-ROM Drive From Images] [WorldOverRide.co.uk] [Create PDF's using pure PHP] [PHP.net Search Bars] [PHP: Check Password Strength][PHP: BB Code] [PHP: Date Select] If you Question has been answered please mark the thread as [RESOLVED] Mediocre post? Please Rate it.
Forum Rules