A very confused Problem in ASkinDemo for V6.21

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #38589
    Support
    Keymaster

      Hello
      Please view this topic. Your problem is similar seems?
      I think this problem will be resolved soon.

      PS. Could you give me a screenshot of problem please?

      #38658
      georgettank
      Participant

        QUOTE (Support @ Apr 10 2009, 02:27 PM)
        Hello
        Please view this topic. Your problem is similar seems?
        I think this problem will be resolved soon.

        PS. Could you give me a screenshot of problem please?

        Thanks for your reply

        But what I mean is that How can I to fit all kind of screen display resolution such as 800*600 1024*768 1280*1024 and

        so on when the frames and all Alphacontrols on them are scaled to maxmized

        Can you give me a perfect way????

        #38666
        Support
        Keymaster

          Sorry, I not quite understand you seems.
          You want to have a scaled form with all controls?

          #38664
          georgettank
          Participant

            Yes,I want to scale all the frames and controls to fit various Screen

            I have try the code belowed

            but it sems doe not work

            unit untFixForm;

            interface

            uses
            Classes, SysUtils, Controls, Forms;

            type
            TFontedControl = class(TControl)
            public
            property Font;
            end;

            TFontMapping = record
            SWidth : Integer;
            SHeight: Integer;
            FName: string;
            FSize: Integer;
            end;

            procedure FixForm(AForm: TForm);
            procedure SetFontMapping;

            var
            FontMapping : array of TFontMapping;

            implementation

            procedure SetFontMapping;
            begin
            SetLength(FontMapping, 3);

            // 800 x 600
            FontMapping[0].SWidth := 800;
            FontMapping[0].SHeight := 600;
            FontMapping[0].FName := 'Tahoma';
            FontMapping[0].FSize := 7;

            // 1024 x 768
            FontMapping[1].SWidth := 1024;
            FontMapping[1].SHeight := 768;
            FontMapping[1].FName := 'Tahoma';
            FontMapping[1].FSize := 9;

            // 1280 x 1024
            FontMapping[2].SWidth := 1280;
            FontMapping[2].SHeight := 1024;
            FontMapping[2].FName := 'Tahoma;
            FontMapping[2].FSize := 11;

            end;

            procedure FixForm(AForm: TForm);
            var
            i, j : integer;
            t : TControl;
            begin
            with AForm do
            begin
            for i := 0 to ComponentCount – 1 do
            begin
            try
            t := TControl(Components);
            t.left := Trunc(t.left * (Screen.width / 1024));
            t.top := Trunc(t.Top * (Screen.Height / 768));
            t.Width := Trunc(t.Width * (Screen.Width / 1024));
            t.Height := Trunc(t.Height * (Screen.Height / 768));
            except
            end; { try }
            end; { for i }

            for i:= 0 to Length(FontMapping) – 1 do
            begin
            if (Screen.Width = FontMapping
            .SWidth) and (Screen.Height = FontMapping.SHeight) then
            begin
            for j := 0 to ComponentCount – 1 do
            begin
            try
            TFontedControl(Components[j]).Font.Name := FontMapping
            .FName;
            TFontedControl(Components[j]).FONT.Size := FontMapping
            .FSize;
            except
            end; { try }
            end; { for j }
            end; { if }
            end; { for i }
            end; { with }
            end;

            initialization
            SetFontMapping;

            end.

            QUOTE (Support @ Apr 16 2009, 06:28 PM)
            Sorry, I not quite understand you seems.
            You want to have a scaled form with all controls?


            #38733
            Support
            Keymaster

              Thank's for code, but I don't know how to use it… <img src="style_emoticons//unsure.gif” style=”vertical-align:middle” emoid=”:???:” border=”0″ alt=”unsure.gif” />
              Maybe you can give a working example with standard controls?
              Thanks

              #38773
              georgettank
              Participant

                hi i have posted it in the other topic

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.