自动调整窗体,使之美观 如何让程序窗体在运行时根据显示器的大小及像素来自动调整,使之美观? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure FSetFormDisplayStart(Frm: TForm);var ScreenWidth, ScreenHeight : integer; FrmWidth, FrmHeight : integer;begin ScreenWidth := Screen.Width; ScreenHeight := Screen.Height; FrmWidth := Round(ScreenWidth / WidthScale); FrmHeight := Round(ScreenHeight / HeightScale); with Frm do begin Width := FrmWidth; Height := FrmHeight; end; FSetFormCenter(Frm);end;//WidthScale = 1.5; //弹出窗体宽度和屏幕的宽比例//HeightScale = 1.8; //高比例 如果只是调整一个Form上的控件,可以再OnResize事件中做调整, delphi如何锁定窗体 如何修改 DBGrid 的 列表中的值 ? 例如将数字 0,1,2, 分别修改为字符 开始,结束,等待. 新人闪亮登场,关键字:版本兼容,组件安装,升级补丁 一个愚蠢的问题? 多态按钮问题 我的程序需要接受参数,该怎么写? 求文件遍历的算法 NMFTP1.List时,怎么强制退出? 怎样作出一个较好的打印预览,请大家给予指点! dbgrideh单元格的内容改变事件? 如何将一个DBGrid控件的多条记录添加到另一个DBGrid控件中, 安装运行turbo pascal 7.0 后,出现一个提示: Error 36 : BEGIN expected.是怎么回事?
var
ScreenWidth, ScreenHeight : integer;
FrmWidth, FrmHeight : integer;
begin
ScreenWidth := Screen.Width;
ScreenHeight := Screen.Height;
FrmWidth := Round(ScreenWidth / WidthScale);
FrmHeight := Round(ScreenHeight / HeightScale);
with Frm do
begin
Width := FrmWidth;
Height := FrmHeight;
end;
FSetFormCenter(Frm);
end;
//WidthScale = 1.5; //弹出窗体宽度和屏幕的宽比例
//HeightScale = 1.8; //高比例