Reputation: 67
I am developing a windows forms application using c#. It has mdi parent form and child forms. My developing environment resolution is 1366 * 768. But I want to develop this application to fit any resolution how can i do this ? e.g (1024 * 768 etc.)
At the moment i have used following lines in the form load event of mdi parent.
this.Location = Screen.PrimaryScreen.WorkingArea.Location;
this.Size = Screen.PrimaryScreen.WorkingArea.Size;
Upvotes: 0
Views: 7766
Reputation: 3258
The problem you are having, with the controls not fitting may be solved by Anchoring or docking the controls. In this way you can decide when the form is made smaller, what happens to the children. Here are some tutorials that you may find useful:
http://www.techotopia.com/index.php/Designing_Forms_in_C_Sharp_and_Visual_Studio http://msdn.microsoft.com/en-us/library/8y52cxte%28v=vs.80%29.aspx http://www.devx.com/dotnet/Article/6964/0/page/3 http://www.techrepublic.com/article/manage-winform-controls-using-the-anchor-and-dock-properties/6165908
Upvotes: 1