Home > DeveloperSection > Forums > How to get Current position of a control on Win Form
Mark Devid
Mark Devid

Total Post:102

Points:714
Posted on    December-16-2013 12:25 AM

 C# C# 
Ratings:


 1 Reply(s)
 857  View(s)
Rate this:
Am trying very hard but not find any method to get the location(x,y) of the control like picturebox on the form.
please help me ...


Pravesh Singh

Total Post:411

Points:2881
Posted on    December-16-2013 12:47 AM

Hi Mark,

you can just use picturebox1.Left as you X and picturebox1.Top as your Y or

you can combine PointToScreen and PointToClient:

Point locationOnForm = control.FindForm().PointToClient(

    control.Parent.PointToScreen(picturebox1.Location));



Don't want to miss updates? Please click the below button!

Follow MindStick