当前位置:主页>仓库管理软件> 列表

如何将程序自动调整界面的大小,使之适应用户的界面(如将在1

企业管理软件版1楼: 如题

2楼: 最简单的办法是设置控件的Anchors,但是这样就限定死了,Dev套件里面有个控件可以做这个事情,Lay什么什么的,记不得了,等楼下的免费批发零售软件

3楼: 用ElasticForm控件,效果还行。

4楼: 需要专用控件才行,自己写代码会累死!

5楼: form 的 align 设置成 alClient 就可以了。不过,你设计界面的时候注意拉伸后的效果。

6楼: to 白乐天 我用的都 是TTF字体,怎么不好用呢?
to zzutrain 那只能对form有作用,而且对form 中的所有控件没有什么作用

企业管理软件版7楼: 把所有的控件都用panel来装。设置panel的Anchors为:akLeft,akTop,akRight,akBottom为true。

如果panel里面只装一个控件的话,设置这个控件的Align为Alclient

8楼: 给分,快快快

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);


private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
Const
Orignwidth=800;
Orignheight=600;

procedure TForm1.FormCreate(Sender: TObject);
begin
scaled:=true;
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;
END;
end.


给分.俺穷死了,

9楼: 学习。。。