Click here to Skip to main content
13,045,285 members (69,080 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I developed an application in C#2010 in my PC. it have many forms .I have defined the forms size (width=1285,Height=950) in the code ,and in the size property of Forms . this worked fine for the PC in which I developed the Application. but when I install the application to another PC which is having different monitor resolution and different monitor size the form is not displayed properly. some portion of the form not visible.

how I can make the form to fit to any PC,Monitor irrespective of its size or resolution.the code I used is shown below

 private void MC_Load(object sender, EventArgs e)
            this.Width = 1285;
            this.Height = 950;
            Point p = new Point(0, 0);
            this.Location = p;
Posted 31-Oct-11 3:50am
Philippe Mori 31-Oct-11 18:17pm
You should design for smaller supported screen size. If the resolution is lower than that, then scrollbar could be used.

1024x768 minus borders and taskbar would generally be the maximum dimension you should uses. The heigh is further reduced, if you plan to support netbooks.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Always design your forms to a minimum specification of screen size and then use the anchors, alignments as Mehdi suggests to help the form resize properly. It is always easier to scale up a design than to scale down which is why I suggest you do it this way.
Espen Harlinn 31-Oct-11 16:12pm
Good advice, Marcus :)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100