Corner position of panel...

lidds

Well-known member
Joined
Oct 19, 2004
Messages
122
Programming Experience
Beginner
I have a form which has a panel on it, what I want to do is find the x and y screen position of the top-left and bottom-right point of the panel. Does anyone know how to do this?

Thanks in advance

Simon
 
This is an example of ask questions first. You should always look first, ask questions later.

The Panel has Top, Left, Bottom and Right properties, plus it has a Location property to give you the top, left corner as a Point, plus a Bounds property to give you the whole area as a Rectangle. All this information could have been found by reading the Help documentation for the Panel class, which should always be your first option.
 
that's easy

top left:
X= Panel.Left
Y= Panel.Top

Bottom right:
X= Panel.Left + Panel.Width
Y= Panel.Top + Panel.Height
 
Back
Top