469,268 Members | 962 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

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

How to get location of a picturebox by clicking on it in c#
Dec 30 '14 #1
2 2049
Luuk
1,043 Expert 1GB
you should now where it is....
after all, you clicked on it!
Dec 30 '14 #2
Joseph Martell
198 Expert 128KB
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.

Similar topics

reply views Thread by Paul L | last post: by
reply views Thread by Lespaul36 | last post: by
4 posts views Thread by Ikey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.