tags:

views:

1623

answers:

7

Hi

I have developed a winform application in 1280 X 1024 pixels.....when using the same screen resolution it shown exactly...But i change my screen resolution to 800 X 600 pixels it shows screen with close button out of screen. How to fix this...is there is any restriction to build an application using a particular screen resolution basically..

Thanks in Advance....

+1  A: 

set the form to fullscreen and the form will always be the correct size.

this.WindowState = FormWindowState.Maximized;

(is it me or is it obvious that a form of 1280x1024 doesn't fit in 800x600 screen?)

PoweRoy
(Shocked) Does that mean that pixels do not scale????
Treb
I think he's asking what size to design for
Chris S
um, Setting a form to Maximized won't help if the form is made for an area bigger than your current resolution?
Svish
He's asking what size he should develop for.
Jon Tackabury
He's asking 2 questions. How to fix the close button and how to design for a resolution. I answered on the first one.
PoweRoy
+5  A: 

1 There is no default resolution. You can observe what resolutions have your clients and take averenge one.

This is tip for you if you develop app for a company. Just go there and take info about it. And if you have need to design app only for one resolution - make sure that company will be ok to have all computers set to this resolution. it's in 99% not able to do, but sometimes it can be done, when your app is so specific and rare and computers are bought only for this one and only app, like netbooks.

2 How to handle different resolutions? Use Dock and Archon methods available mostly in every these days GUI application development tools.

When you will use this, controls will naturally scale to size of a screen and your controls will no longer go behind corners of your app.

3 There is no restriction to build app for a resolution you choose.

But nowadays app I think can assume that res is min. 1024x768. And when it overlaps like you describe on 800x600 just don't bother yourself to implement fancy logic to handle this one. User will catch fast that he needs to change res to higher one.

tomaszs
Anchor methods, not Archon.
Jean Azzopardi
+1  A: 

You have to use Anchors to each object in your layout.

This means that the layout will follow that anchor side when resizing the window. (It can ofcause be hard do downsize a window.)

Hkkathome
A: 

You can work out how much "real estate" you have to design for by asking yourself who your target audience are.

  • Internal users in a company? Easy to find out the company's default screen size
  • External company. Again, ask
  • Joe Blogs on the web - design for 800x600. If that's not enough then 1024x768 is the most popular screen resolution now

Here's some display statistics for browsers which basically the same thing.

This slashdot post has lots of info, though that's 2005 and it might be even higher resolution now.

Chris S
A: 

I just wanted to add, that nowadays, we should also worry about Netbooks, that usually come with resolutions 1024*XXX where XXX is not always 768. It might be less, due to wide screens and whatnot.

Petros
A: 

The best way is probably to redesign your layout to support resizing: You can use the Anchor/Dock properties of controls (usually together with sub-Panels) to let your forms change the layout when they are resized. Perhaps you might also consider using a TableLayoutPanel or similar layout helpers.

If you don't want to change your layout and just need a quick fix, you could just set the AutoScroll property of your forms to True (and make them resizable by setting FormBorderStyle to Sizable, if you didn't already). Then the user can make the form smaller and still has access to all controls by using the scroll bars.

MartinStettner
A: 

In fact, anchoring does not work properly if the form does not fit in the screen. It gets shrinked before the layout logic is applied, so the controls get out of form anyway. I'm searching for a proper solution.