How to get Current position of a control on Win Form

Total Post:102

Points:714
C# 
C#
 1497  View(s)
Ratings:
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 ...
  1. Post:412

    Points:2888
    Re: How to get Current position of a control on Win Form

    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));


Answer