Re:windows font size problem
what i do is keep window size & font in an INI file. then in the form
create, I read in these params into the form. I also use tform's scaleby
method to compensate for changes in res
eg
const
designtimescale = 120;
procedure rescaleform(aform : tform);
begin
With aform do begin
if (tag = 0) then begin
scaleby(designscale,runscale);
pixelsperinch := runscale;
tag := 1;
end;
end;
end;
PROCEDURE tinifile.readform(aform : tform);
begin
With aform do begin
font.assign(readfont(Caption, Ini_font));
rescaleform(aform);
Left := ReadInteger(Caption, Ini_WLeft, Left);
Top := ReadInteger(Caption, Ini_WTop, top);
Width := ReadInteger(Caption, Ini_WWidth, width);
Height := ReadInteger(Caption, Ini_WHeight, height);
end;
end;
initialization
runscale := screen.pixelsperinch;
end.
--
Boris Ingram, Cyborg Software
boris...@iafrica.com
100076.3...@compuserve.com
http://www.pcb.co.za/users/borising/cyborg.htm
Adam Sorati <asor...@link.com.au> wrote in article
<3352F9C5.4...@link.com.au>...
Quote
> My Application was design with windows small fonts selected,
> the problem now is that when the uses install the application
> and run it with windows large font selected the screens are
> completely out.
> Has anyone come across this problem?
> Does anyone know how to check what font size is selected and change
> the font within the application?
> Please help.
> Another problem is my Application was designed for 640 x 480 or
> 800 x 600 screen resolution, when resolution is 1024 x 768 the screen
> is very small and in the corner of the desktop.
> Is there a way to adjust the application depending on the
> windows resolution?
> The application is in the final stage and I am desperate for
> answers, please if someone can help
> email me at asor...@link.com.au
> Thankyou.
> Adam Sorati
> asor...@link.com.au