Screen resolution on deployment

D

David

Could someone please advise how to cope with various screen resolutions
that are used when an application is deployed to other machines that
have different screen resolutions than the development machine.

Should the application be developed in a moderate resolution screen
(say 800 x 600) and then have the application switch the target machine
to this mode when running ? If so, how would I do this.

Or is there a way that the application scales itself to fit the mode of
the target machine ?

Thanks in advance

Regards

David
 
H

Herfried K. Wagner [MVP]

David said:
Could someone please advise how to cope with various screen resolutions
that are used when an application is deployed to other machines that have
different screen resolutions than the development machine.

Should the application be developed in a moderate resolution screen
(say 800 x 600) and then have the application switch the target machine to
this mode when running ? If so, how would I do this.

It's often a bad idea to change the users's screen resolution
programmatically.
Or is there a way that the application scales itself to fit the mode of
the target machine ?

I suggest to use resizable forms. You can use the controls' 'Anchor' and
'Dock' properties to enable automatic positioning if the form is resized.
When setting the form's 'WindowState' property to 'Maximized' the form will
fill the whole desktop/screen. In addition, the form's 'MinimumSize' and
'MaximumSize' properties can be used to set minimal and maximal bounds of
the form.
 
P

Phill. W

Should the application be developed in a moderate resolution screen
(say 800 x 600) ...
Yes.

... and then have the application switch the target machine to this
mode when running ?

Absolutely not!
(unless you're writing an arcade game!).

You'll annoy your users, who already have /their/ monitors set up
the way /they/ want them and you can't even guarantee that the
monitor (or whatever) that they're actually using supports /any/
given resolution especially with the increase in LCD monitors,
these days.
Or is there a way that the application scales itself to fit the mode
of the target machine ?

Use the Anchor and Dock properties on each Control to take
advantage of higher resolutions or, if you're developing forms that
other Developers inherit from, be prepared to cut your own Layout
code to position things (not entirely sure why, but using Anchoring in
the base form gave me a /lot/ of grief).

HTH,
Phill W.
 
B

Bob Powell [MVP]

In addition to the valuable comments made by others on this thread you may
wish to look into custom layout schemes. The GotDotNet site has quite a bit
of information on this subject.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top