By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,619 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

location of picturebox: How to get location of a picturebox by clicking on it in c#

P: 1
How to get location of a picturebox by clicking on it in c#
Dec 30 '14 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,031
you should now where it is....
after all, you clicked on it!
Dec 30 '14 #2

Joseph Martell
Expert 100+
P: 196
Luuk's answer gets you the location of a point on the screen. If you want the location on your form then you can just use the PictureBox's Location property:
Expand|Select|Wrap|Line Numbers
  1.         private void pictureBox1_Click(object sender, EventArgs e) {
  2.             Point location = pictureBox1.Location;
  3.         }
  4.  
  5.  
Jan 17 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.