Question Determining opening location of a form.

priyamtheone

Well-known member
Joined
Sep 20, 2007
Messages
96
Programming Experience
Beginner
I have a button on my form. When I click it, I want a form to be opened exactly on the location where the button is. How to achieve this? Thanks.
 
You need to set StartPosition to Manual and set a Location, this Point is the return value of using the buttons PointToScreen method with argument Point.Empty. PointToScreen converts client coordinates to screen coordinates and Point.Empty (0,0) is the clients top-left corner in client coordinates.
 
Back
Top