procedure Tform1.FormShow(Sender: TObject);
begin
frmWork.AutoScroll := False;
Scaleby(Screen.Width, 800); //假设设计时屏幕设置为800*600
end;
begin
frmWork.AutoScroll := False;
Scaleby(Screen.Width, 800); //假设设计时屏幕设置为800*600
end;
解决方案 »
- PChar与PByte 有什么区别?
- Delphi7中想做个统计图——柱形图,用哪个控件?
- 推荐若干个非常实用的DELPHI技巧!强!!
- 用idftp如何得到ftp服务器的路径并检测某个文件夹有则上传没有就创建并上传,在线等!!谢谢
- 一个简单问题,函数过程调用,各位大虾帮忙?
- 在TStringGrid编辑模式下,按下回车,转到非编辑模式,如何获取此事件?
- MIDAS中,怎样通过Client.exe生成MS Sql2000数据库?(就像《管家婆》那样,运行一次客户端,输入数据库的名称,就会自动在SQL Server2000
- 平时本地连接的收到数据包都不超过100的,今天竟然超过3,500.000包,究竟是怎么回事
- dbgrideh安装时,提示我找不到某某文件(几个版本都是),但是该文件的确存在,不知有何诀窍。请赐教
- 急!如何打印stringGrid的问题?望高手解答!!!!!100分
- Help.Create(self); 在线等待!
- 如何连接同一数据库中不同用户所属的表?
inplementation
const
ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
ScreenHeight: LongInt = 600;{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
begin
scaled := true;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) div ScreenHeight;
width := longint(width) * longint(screen.width) div ScreenWidth;
scaleBy(screen.width, ScreenWidth);
end;
end;下一步,要让每个子控制的字体改变到合适的大小:
type
TFooClass = class(TControl); { needed to get at protected }
{ font property }var
i: integer;
begin
for i := ControlCount - 1 downto 0 do
TFooClass(Controls[i]).Font.Size :=
(NewFormWidth div OldFormWidth) *
TFooClass(Controls[i]).Font.Size;
end;
请问我应该把控制字体的那段代码放在什么位置?