Re: Any good screen resolution components?
- From: "Roger Lascelles" <rogerlasAToptusnet.com.au>
- Date: Fri, 24 Mar 2006 19:29:56 +1100
"Sarah" <SarahBram@xxxxxxxxxxx> wrote in message
news:4422f586$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Are there any good screen resolution components to use in a Delphiproject?
These days we have all kinds of weird resolutions and screen ratios withdifferent laptops.
A lot of our screens get chopped up at right side.
When this issue hits you, it is natural to think that this is a "problem"
which has a "solution". But when you think about it, what would a magical
screen resolution component actually do? You don't want it to make your app
run at a different resolution to the rest of the apps on screen, so that is
not the need. You also have the issue of widescreen displays v.s. the
squarer displays.
It turns out that the problem goes away if you design your forms to be
resizable. That often means using controls with Align = alClient, so they
fill the available window. For example TMemos, grids, images can be as big
as the form permits. There will still be a minimum size for your form,
where the buttons and edits whch are of fixed size, simply cannot fit in the
space. You can handle the OnResize method of your form to reposition
controls to make the best of the space.
Delphi automatically alters your form size in pixels and form text sizes to
stay in proportion to your Windows DPI settings. It is important to permit
this by leaving Scaled = True for each form, otherwise you condemn your app
to looking out of step with all the other apps running.
In serious software, I set each form to its minimum sensible height and
width, often something less than 800x600 or 640x480 and make it resizeable
and start at app main form center or screen center. When the form closes, I
save the form position and size in the registry and each time the form is
opened, I set the position and size to the saved value. This gives the user
the comfort of a consistent, tailored app. Because a PC can be set to
multiple Windows DPI settings, a separate set of form data is saved for each
DPI value encountered.
All this sounds like a lot of work. I made a TFormMinder class which
manages the complexities. There are components around which might do a
similar job.
Roger Lascelles
.
- Follow-Ups:
- Re: Any good screen resolution components?
- From: William Meyer
- Re: Any good screen resolution components?
- From: Sarah
- Re: Any good screen resolution components?
- References:
- Any good screen resolution components?
- From: Sarah
- Any good screen resolution components?
- Prev by Date: Re: Tour Delphi 2006 with David I.
- Next by Date: Re: Go, software activation, go!
- Previous by thread: Re: Any good screen resolution components?
- Next by thread: Re: Any good screen resolution components?
- Index(es):
Loading