- This topic has 6 replies, 2 voices, and was last updated 15 years, 7 months ago by georgettank.
-
AuthorPosts
-
April 9, 2009 at 5:01 pm #32823georgettankParticipant
I am now doing a big project using the latest version V6.21 ,There are so many frames to be added with your skined soluton in my project .
All the frames including Mainform should be Maxmized to fit all kind of screen display resolution this time. I have compiled the ASkinDemo program for v6.21 .
I found it hard to do this perfectly .What i mean is that not all the controls in the frames or forms can fit the screen good. especialy,some controls can not be displayed properly.How can i to solve the confused Problem.Can you give me a solution or an example? thanks a lots.Best regards
April 10, 2009 at 6:27 am #38589SupportKeymasterHello
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?
April 15, 2009 at 4:04 am #38658georgettankParticipantHello
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????
April 16, 2009 at 10:28 am #38666SupportKeymasterSorry, I not quite understand you seems.
You want to have a scaled form with all controls?April 16, 2009 at 12:57 pm #38664georgettankParticipantYes,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.
Sorry, I not quite understand you seems.
You want to have a scaled form with all controls?April 21, 2009 at 12:39 pm #38733SupportKeymasterThank'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?
ThanksApril 22, 2009 at 8:06 am #38773georgettankParticipanthi i have posted it in the other topic
-
AuthorPosts
- You must be logged in to reply to this topic.