怎样设置FORM在不同分辨率下都能完整显示内容啊? 我在1024*768下做的界面但到了800*600就不能完整显示了。怎么办啊? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 试试吧:implementation const ScreenWidth:LongInt=800; ScreenHeight:LongInt=600; {$ R*.DFM} procedure TMainForm.FormCreate(Sender:TObject); var OldFormWidth:integer; begin Scaled:=TRUE; if(Screen.width<> ScreenWidth)then begin OldFormWidth:=Width Height:=longint(Height)*longint(Screen.Height)DIV S creenHeight; Width:=longint(Width)*longint(Screen.Width)DIV Scre enWidth; ScaleBy(Screen.Width,ScreenWidth); Font.Size:=(Width DIV OldFormWidth)*FontSize; end; end; delphi 怎么判断字符数组是否为空 Image 的奇怪问题,求助 !!!!!进来呀!!! 有卡片式DBGrid控件吗? Delphi中override和overload的定义和区别是什么? delphi中类似于On Error GoTo的语句是什么 如何把文件以流的形式写入数据库? 很菜的问题,过来捡分。 请教数据的修改问题 单击LISTVIEW某行,怎样获得该行的行号? 关于Ocx,Dll Active 控件的卸载???? 哪儿能下Delphi 7 .1 update ,绝对给分
implementation
const
ScreenWidth:LongInt=800;
ScreenHeight:LongInt=600;
{$ R*.DFM}
procedure TMainForm.FormCreate(Sender:TObject);
var
OldFormWidth:integer;
begin
Scaled:=TRUE;
if(Screen.width<> ScreenWidth)then
begin
OldFormWidth:=Width
Height:=longint(Height)*longint(Screen.Height)DIV S creenHeight;
Width:=longint(Width)*longint(Screen.Width)DIV Scre enWidth;
ScaleBy(Screen.Width,ScreenWidth);
Font.Size:=(Width DIV OldFormWidth)*FontSize;
end;
end;