Hi
The user is probably using large fonts. Delphi seems to change the form
layout sizes of various controls, but doesn't change the form size to suit,
hence the scroll bars on the form. I wrote some code to look for the font
size and to scale all forms in my application after they have been created.
I think that some things still look a bit weird so you my just be better to
tell then to use normal (small) fonts.

ps 
If any one has a better way of doing this comments would be appreciated. 

pps
Is anyone using laptops with 15" screen and 1280 x 1024 screens?
I have looked at them and I cant see how you can use normal (small) fonts
without getting eyestrain? Putting my 17" monitor to this resolution just
makes the text way too small.

program AslOrderLookup;

uses
  Windows,
  Classes,
  Forms,
  Registry,
  SysUtils,
  Unit1 in 'Unit1.pas' {Form1},
  PrintOrderUnit in 'PrintOrderUnit.pas' {PrintOrderForm};

{$R *.RES}

// Windows, Classes, Forms, Registry, SysUtils,
procedure ScaleFormsForLargeFonts;
var
  Reg : TRegistry;
  Scale : Real;
  I: Integer;
  Temp: TComponent;
begin
  Reg := TRegistry.Create;
  Scale:=1;
  try
    Reg.RootKey := HKEY_CURRENT_CONFIG;
    if Reg.OpenKey('\Software\Fonts', False) then
      Scale:=Reg.ReadInteger('LogPixels')/96;
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
  with Application do
    for I := ComponentCount - 1 downto 0 do
    begin
      Temp := Components[I];
      if (Temp is TForm) then
        with TForm(Temp) do begin
          Height:=Trunc(Height*Scale);
          Width:=Trunc(Width*Scale);
        end;
    end;
end;

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TPrintOrderForm, PrintOrderForm);
  ScaleFormsForLargeFonts;
  Application.Run;
end.



-----Original Message-----
From: Chris Veale [mailto:[EMAIL PROTECTED]
Sent: Thursday, 18 September 2003 09:13 a.m.
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Form size changing/scrolling?


the fonts and controls are all fine, but the form area has been reduced so
that now the form has to be scrolled to view (partially) the entire form.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Paul Mckenzie
> Sent: Thursday, 18 September 2003 9:05 a.m.
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: Form size changing/scrolling?
>
>
> What is happening to the forms ?
> - Are the Controls being repositioned and/or rescaled ?
> - Are the Fonts being repositioned and/or rescaled ?
> - Does it look more like the controls and Fonts are correct
> but the Form
> area has been reduced ?
>
> Regards
> Paul McKenzie
> Analyst Programmer
> SMSS Ltd.
>
> ----- Original Message -----
> From: "Chris Veale" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Thursday, September 18, 2003 8:47 AM
> Subject: [DUG]: Form size changing/scrolling?
>
>
> > Hi all.
> >
> > I have created a program that runs fine on desktop
> computers but when it
> is
> > run on laptops the forms do something weird and the user
> now has to scroll
> > them to see the full screen.
> >
> > the first form I display is only 400 x 200 pixels but no matter what
> > resolution the laptop is set to the user has to scroll,
> even if its 1400 x
> > 1080 resolution and the form is small in the center of the screen -
> without
> > having a need (technically) to scroll.
> >
> > Can anyone suggest a solution to this?  I've never come across this
> before.
> >
> > Cheers
> >
> > Chris Veale
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/03
> >
> >
> >
> >
> > ______________________________________________________
> > The contents of this e-mail are privileged and/or
> confidential to the
> > named recipient and are not to be used by any other person and/or
> > organisation. If you have received this e-mail in error,
> please notify
> > the sender and delete all material pertaining to this e-mail.
> > ______________________________________________________
> >
> --------------------------------------------------------------
> ------------
> -
> >     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
>
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/03
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/03


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
For more information please visit www.marshalsoftware.com
#####################################################################################
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to