Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear all,

I'm biggenner in programming world.....


My development PC's LCD size is 17-inch. I develop application which fits to my LCD. Every controls is placed at proper place and whole screen area is used.

Problem is that end-users of this application has different screen size i.e. 17, 19, 21, 15 and e.t.c.


End-users (having screen size greater than 17) demanded to use all screen area by spreading controls and increasing size of controls

while end-users (having screen size less than 17) demanded that application form should be fit on screen instead of scroll bars.

Please guide and share usefull links if any. I don't want to write separate code for all end-users due to only screen size.


Thanks in advance.
Posted
Updated 18-Mar-14 5:42am
v2
Comments
aboubkr90 18-Mar-14 11:44am    
Asp.Net or Winforms
DoingWork 18-Mar-14 13:24pm    
winforms (by vs2010)
aboubkr90 20-Mar-14 3:22am    
Then Docking & Auto-Sizing may help
aboubkr90 20-Mar-14 3:16am    
Docking and auto-sizing is the way to go.

Basically, you can't. It's not the physical size of the screen that is the problem, but rather the resolution at which you application is being displayed: with can vary from (say) 800 by 600 to 2,560 by 1,600 - which is not just a change in resolution, but in shape as well. Since your form is defined (as they always are) in terms of pixels, what fits your screen may not fit another - in fact it's very unlikely to: I have two 22" monitors, one portrait, and one landscape, so you application would have to cope with 1080 by 1920 on my left hand monitor, and 1680 by 1050 on my right.

Unless your application is organised like VS, with a central "work area" and tools etc round the edges, you can't easily (or even reasonably) expect anything to fit even just both of those.

You can do somethings, using the Anchor and Dock properties, particularly if you group controls together in panels and anchor and dock the panels to the form, but seriously, unless your application is well designed from scratch to cope with this kind of thing, it's never going to look good.

The other option is to switch over to WPF, which handles it better - but even then, it's rather more of a PITA than it's generally worth.
 
Share this answer
 
Consider the following HTML, without any Javascript and CSS:
HTML
<html>
<body>
<h1>This is the example of fluid HTML</h1>
    <p>Isn't that obvious: if you resize the browser window, this content is shown properly and remains readable for almost all sizes? Conclusion? Keep it simple&hellip;
</body>
</html>
This example demonstrates: if you keep everything simple, such problems don't exist. You create this problem by adding your styles, maybe even absolute positioning and other things. No wonder your layout cannot tolerate change in the browser window size. Pay attention that the screen size is not the only factor. The user can change the size of the browser window anytime.

It does not mean that keeping the design simple you cannot create good looking Web pages. This is actually a big art: Web design.

Among many other things, you may want to embrace liquid, fluid and elastic design, all referenced to past answers:
http://www.codeproject.com/Answers/537436/Webpage-screen-resolution-Cross-Browser-Cross-Plat.aspx#answer2
http://www.codeproject.com/Answers/578125/ToplusGetplusScreenplusresolution#answer1.

—SA
 
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