automaticly fit the system resolution and fonts set

I have made a application on 800*600 system resolution and "Large Fonts",but when I run it on another system resolution
and another Fonts seting,some control is out of The Form.
How do I avoid it?
Who is Participating?
viktornetConnect With a Mentor Commented:
jdev, do you think it is a component that I created? I created a component for venks that asked me how to do that.. Here is the source code.... I called it TScaler also that's why i asked you if it is mine,,, I didn;t take much time to write it, but you could try it in a project and if something doesn't work proeprly let me know.. I'll correct it... Just set the constants in the beginning of the code to the resolution you created your app at... It scales the form, all components, and the font also.. Hope this helps...

unit Scaler;


       Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
        ScreenWidth  : Integer = 800; //If you don't want to declare
                                     //you'd have to have a
        ScreenHeight : Integer = 600;//property for each of these two so
you can
    // declare it at //designtime
       TScaler = class(TComponent)
         FAllScaled : Boolean;
         { Protected declarations }
         constructor Create(AOwner : TComponent);override;
         procedure Loaded;override;
         { Published declarations }
     procedure Register;
constructor TScaler.Create(AOwner : TComponent);
  Inherited Create(AOwner);
  fAllScaled := False;
procedure TScaler.Loaded;
  if not(csDesigning in ComponentState) then
    if Owner is TForm then
    with TForm(Owner) do begin
      Font.Pitch := fpVariable;
      if (not

         Scaled := True;
         AutoScroll := False;
          if Screen.Width < ScreenWidth then
         ScaleBy(Screen.Width, ScreenWidth)
         else ScaleBy(ScreenWidth, Screen.Width);
         fAllScaled := True;
procedure Register;
  RegisterComponents('System', [TScaler]);

there are different ways.
a tip:
Screen.Width  is the current x resolution ( f.e. 800 )
Screen.Heigth is the current y resolution ( f.e. 600 )
to avoid problems with the large or small fonts, you should define the font of your Form
yourself, so the system font will not be used.

Greetings, Oli
The best thing to do, although it limits you a bit, is to design all of your applications with 640X480 as the target resolution using small fonts.  That way you cover all your bases.  The only exception would be if the user was running 640X480 using large fonts - but that is highly unlikely.  I understand Oil2's suggestion, but I personally dont agree with it.  If the user is running say 1024X768 using large fonts, I dont think the he/she would appreciate your app ignoring his system settings.  That is just my opinion though.

I have tried a scaler component which i got off of some component site.
I believe it was called TScaler :P

Basically, it automatically scales all components on the form. I designed at 800x600 and
it looked okay at both 640 and 1024.I remember some issue with grids, they had a separate component to use with grids.

Caution: I only played with it a bit, I never used it in a professional app.

If you can find one give it a shot.

best regards
I'm not sure if i did the right math, but you can also use the Height of the screen and scale it by it and not only by the Width,,,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.