Board index » delphi » Problems with dynamic form sizes when large fonts is on

Problems with dynamic form sizes when large fonts is on

Quote
In article <7mdm3u$rp...@forums.borland.com>, William wrote:
> This is fine except when the user has the Large Font size
> option enabled, which seems to enlarge the buttons, etc meaning that half of
> the items are missing on my resized form.

Try setting Form.Scaled=False.

 Mike Orriss (TeamB)
 (Unless stated otherwise, my replies relate to Delphi 4.03)
 (Unsolicited e-mail replies will most likely be ignored)

 

Re:Problems with dynamic form sizes when large fonts is on


Hi

I have a number of forms that are different heights depending on which
options are set.  This is fine except when the user has the Large Font size
option enabled, which seems to enlarge the buttons, etc meaning that half of
the items are missing on my resized form.

How can i either
- test how much the objects have been enlarged so that i can set my form
height appropriately, or
- control the size of objects even when large fonts are used.

Thanks in advance

William
NO_SPAM.the_white_ho...@usa.net
(Remove NO_SPAM from my address when e-mailing)

Re:Problems with dynamic form sizes when large fonts is on


Thanks Mike, you pointed me in the right direction.  Form.scaled led me to
pixelsperinch.

Now I simply use the following function when dymanically setting a form
size.

function setproportionalscreensize(insize:integer):integer;
const
 desppi=96;
begin
  result:=trunc((insize / 96)* screen.pixelsperinch);
end;

William

Re:Problems with dynamic form sizes when large fonts is on


so what's the purpose of the "const desppi=96" statement?
Wayne
Quote
William wrote:

> Thanks Mike, you pointed me in the right direction.  Form.scaled led me to
> pixelsperinch.

> Now I simply use the following function when dymanically setting a form
> size.

> function setproportionalscreensize(insize:integer):integer;
> const
>  desppi=96;
> begin
>   result:=trunc((insize / 96)* screen.pixelsperinch);
> end;

> William

Re:Problems with dynamic form sizes when large fonts is on


Ha ha, not a lot, i was supposed to replace the 96 value with the const in
the function.

William

Quote
Wayne Sheffield <wgs...@atel.net> wrote in message

news:378C7495.8B459D0F@atel.net...
Quote
> so what's the purpose of the "const desppi=96" statement?
> Wayne

Other Threads