TO hcm0790:
实在对不起,我不知道CONST该在那里用,我放在外面运行不走,还有就是Scaleby应该怎么
定义?我这样放的,但是不能运行,我知道肯定是错的!!请指教!!!
var Height,Width,Scaleby:longint;
Const
OrignHeight = 600;
OrignWidth = 800;
begin
//800*600與1024*768 解析度自適應
If (Screen.Width <> OrignWidth) then
begin
Height := LongInt(Height)*LongInt(Screen.Height) Div OrignHeight ;
Width := LongInt(Width)*LongInt(Screen.Width) Div OrignWidth ;
Scaleby(Screen.Width , OrignWidth);
end;
If Screen.Width = 800 then
begin
If Height > 475 then
Height := 475 ;
If Width > 790 then
Width := 790 ;
end;
If Screen.Width = 1024 then
begin
If Height > 630 then
Height := 630 ;
If Width > 1010 then
Width := 1010;
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
form2.Align:=alclient;
mmspeedbutton1.Glyph.LoadFromFile('./S1.BMP');
end;