Click here to Skip to main content
15,894,539 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm building a windows form (form1) which opens another form (form2) on the click of a button. I want the second form to always appear 100px above the first one and i want the first one to appear exactly 600px from the left side of the screen. I can manually code their positions but then when i run the program on a different screen resolution, their positions go haywire.
I don't find find any dock and anchor properties either for the forms (like the ones present for controls).
Is there any way i can position the forms relative to each other and also to the screen?
Posted

1 solution

There is no docking or anchor properties that relate to the overall screen. You can use SystemInformation.PrimaryMonitorSize to retrieve the screen size and position you forms appropriately.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900