Board index » delphi » Windows wrong size on some screens

Windows wrong size on some screens

Greetings,

I'm cleaning up a large Delphi program that has about 50 forms.  These
were designed in plain VGA mode, 640x480, to ensure maximum portability
(or so we thought).  When we run the program on some video cards
(apparently in modes with "large fonts" selected), the windows appear
too small, with scroll bars, even though there's a lot of room on the
screen.  What should we do?
Is there a good general solution?  Did the programmers make some
elementary blunder?

Thanks,
--
Michael A. Covington                       http://www.ai.uga.edu/~mc
Associate Director, Artificial Intelligence Center
The University of Georgia, Athens, GA 30602-7415 U.S.A.

 

Re:Windows wrong size on some screens


Quote
>(or so we thought).  When we run the program on some video cards
>(apparently in modes with "large fonts" selected), the windows appear
>too small, with scroll bars, even though there's a lot of room on the
>screen.  What should we do?

Further to the above, the problem arises precisely when "Large Fonts" are
selected.

A kluge to work around it is to do this:

    Form1.Height := Form1.Height * round(Screen.PixelsPerInch / 96);
    Form1.Width := Form1.Width * round(Screen.PixelsPerInch / 96);

when the form is first activated (taking care never to do this more than
once, or the form grows and grows!).

Is there a better solution?

Re:Windows wrong size on some screens


I have experienced the same problem.
Setting the forms AutoScroll property to False solved the problem.
At least thats how i remember it.

Finn Tolderlund

Michael A. Covington <m...@ai.uga.edu> skrev i artiklen
<6mm777$4f...@cronkite.cc.uga.edu>...

Quote
> >(or so we thought).  When we run the program on some video cards
> >(apparently in modes with "large fonts" selected), the windows appear
> >too small, with scroll bars, even though there's a lot of room on the
> >screen.  What should we do?

> Further to the above, the problem arises precisely when "Large Fonts" are
> selected.

> A kluge to work around it is to do this:

>     Form1.Height := Form1.Height * round(Screen.PixelsPerInch / 96);
>     Form1.Width := Form1.Width * round(Screen.PixelsPerInch / 96);

> when the form is first activated (taking care never to do this more than
> once, or the form grows and grows!).

> Is there a better solution?

Re:Windows wrong size on some screens


Quote
Finn Tolderlund wrote in message

<01bd9ea8$aab93240$55226...@HERPFTL.edbgruppen.dk>...

Quote
>I have experienced the same problem.
>Setting the forms AutoScroll property to False solved the problem.
>At least thats how i remember it.

>Finn Tolderlund

That did the trick.  Thanks!

Re:Windows wrong size on some screens


In article <6mm777$4f...@cronkite.cc.uga.edu>, Michael A. Covington
<m...@ai.uga.edu> writes

Quote
>Is there a better solution?
>(to probs with form sizing and large fonts)

Try setting the form SCALED property to FALSE and always use True
Trutype fonts of course
--
Paul Grenet

Other Threads