Board index » delphi » Help - Forms and different screen resolutions (or font sizes)

Help - Forms and different screen resolutions (or font sizes)

I have a problem with the small application I am currently developing.

If I lay out my form nice and neatly under a certain resolution and font
size I can get it the way I want.

But what if a user uses a different font size (ie Large Fonts instead of
Small fonts) my forms then end up looking like a mess.

OK - I know this is not a new problem, but if some one has any good
solutions I would appreciate an E-Mail.

The strange part about it is that some forms look fine and some don't.

To explain further, some forms show at the correct size but all the text
boxes are twice as deep as they need to be, while other forms show smaller
than they are supposed to be, but all the text boxes are the right height
(ie different height to the forms that show at the correct size).

If any body knows why this is or what I can do to ensure that the forms
look right in all resolutions and font sizes could you please let me know.

Thanks,
C Fraser

 

Re:Help - Forms and different screen resolutions (or font sizes)


Quote
co...@rjhill.co.nz (C Fraser) wrote:
>If I lay out my form nice and neatly under a certain resolution and font
>size I can get it the way I want.
>But what if a user uses a different font size (ie Large Fonts instead of
>Small fonts) my forms then end up looking like a mess.

I've just started creating Delphi applications, and have encountered
the exact same problem.  After postings to this newsgroup, I've found
that giving the form's Scaled property a True value, and creating and
compiling the program under a 640x480 resolution with Small fonts
really helps.  When I tested my form, everything seemed okay under
1024x768 Large font, although my edit box had been made larger than
needed (not a big deal for me though).

It didn't solve ALL problems of different resolutions/font sizes for
me, but it improved things tremendously.

Liam Quinn
aqu...@hookup.net
http://www.hookup.net/~aquinn/liam.html

Re:Help - Forms and different screen resolutions (or font sizes)


Quote
C Fraser (co...@rjhill.co.nz) wrote:

: I have a problem with the small application I am currently developing.

: If I lay out my form nice and neatly under a certain resolution and font
: size I can get it the way I want.

: But what if a user uses a different font size (ie Large Fonts instead of
: Small fonts) my forms then end up looking like a mess.

: OK - I know this is not a new problem, but if some one has any good
: solutions I would appreciate an E-Mail.

: The strange part about it is that some forms look fine and some don't.

: To explain further, some forms show at the correct size but all the text
: boxes are twice as deep as they need to be, while other forms show smaller
: than they are supposed to be, but all the text boxes are the right height
: (ie different height to the forms that show at the correct size).

: If any body knows why this is or what I can do to ensure that the forms
: look right in all resolutions and font sizes could you please let me know.

: Thanks,
: C Fraser

I have a related (I think) problem.  My display fonts are messed up when I
run Delphi.  Most of them are fine -- the menus look good, and the Object
Editor is fine.  But when I bring up some dialogs, most noticably the
Options|Environment one, the text looks, well... funky .., and doesn't fit
inside the edit boxes.  I suspect that whatever is causing my problem
causes the same problem when you develop forms and run them in a different
resolutions...

If anybody has any ideas/suggestions, please post or e-mail me. Thanks!

greg gruber

Re:Help - Forms and different screen resolutions (or font sizes)


Liam Quinn wrote in a message to All:

LQ> From: aqu...@hookup.net (Liam Quinn)

LQ> co...@rjhill.co.nz (C Fraser) wrote:

Quote
>If I lay out my form nice and neatly under a certain resolution and font
>size I can get it the way I want.
>But what if a user uses a different font size (ie Large Fonts instead of
>Small fonts) my forms then end up looking like a mess.

LQ> I've just started creating Delphi applications, and have
LQ> encountered the exact same problem.  After postings to this
LQ> newsgroup, I've found that giving the form's Scaled property
LQ> a True value, and creating and compiling the program under a
LQ> 640x480 resolution with Small fonts really helps.  When I
LQ> tested my form, everything seemed okay under 1024x768 Large
LQ> font, although my edit box had been made larger than needed
LQ> (not a big deal for me though).

I've thought long and hard about this, but still haven't sat down with it in
earnest. The way it works for me, right now, is like {*word*99}. Everything looks
horrendously distorted at higher resolutions :(

On another - but related - note, I would like all controls on a form to - in
some way - resize automatically when the user changes window size. I've thought
about a routine that is passed a form (or its array of controls) and walks
through them, resizing and repositioning as necessary. Any ideas?

Best regards,
   Christian // ctib...@silver.ct.se

... IF(!CRASH()) _THANK_GOD();

Re:Help - Forms and different screen resolutions (or font sizes)


I've (well not I) solved almost the problem.

On every component (including the forms) set the font.Pitch property to fpVariable. This should take care of resizing(?) editboxes etc.
If you then set you the forms borderstyle to bsSingle or bsDialog your application want change look when you switch resolution.
What i might do i to resize it (smaller form - higher resolution) but it looks the same all time.

Did you get it?

Filip Hanik
d4fi...@dtek.chalmers.se

Quote
Christian Tiberg (christian.tib...@silver.ct.se) wrote:

: Liam Quinn wrote in a message to All:

: LQ> From: aqu...@hookup.net (Liam Quinn)

: LQ> co...@rjhill.co.nz (C Fraser) wrote:

: >If I lay out my form nice and neatly under a certain resolution and font
: >size I can get it the way I want.

: >But what if a user uses a different font size (ie Large Fonts instead of
: >Small fonts) my forms then end up looking like a mess.

: LQ> I've just started creating Delphi applications, and have
: LQ> encountered the exact same problem.  After postings to this
: LQ> newsgroup, I've found that giving the form's Scaled property
: LQ> a True value, and creating and compiling the program under a
: LQ> 640x480 resolution with Small fonts really helps.  When I
: LQ> tested my form, everything seemed okay under 1024x768 Large
: LQ> font, although my edit box had been made larger than needed
: LQ> (not a big deal for me though).

: I've thought long and hard about this, but still haven't sat down with it in
: earnest. The way it works for me, right now, is like {*word*99}. Everything looks
: horrendously distorted at higher resolutions :(

: On another - but related - note, I would like all controls on a form to - in
: some way - resize automatically when the user changes window size. I've thought
: about a routine that is passed a form (or its array of controls) and walks
: through them, resizing and repositioning as necessary. Any ideas?

: Best regards,
:    Christian // ctib...@silver.ct.se

: ... IF(!CRASH()) _THANK_GOD();

Other Threads