注册 登录
编程论坛 新人交流区

加载表单问题

wyd531 发布于 2007-11-07 14:10, 413 次点击

问题是:
程序有个主表单,通过主表单掉用其它的表单,
子表单,里是个DBGRID,DBGRID的大小是有表单的大小定的,

procedure Tld_table.FormCreate(Sender: TObject);
begin
//设置表的大小
DBGrid1.Width:=ld_table.Width-10;
DBGrid1.Height:=ld_table.Height-120
end;

procedure Tld_table.FormPaint(Sender: TObject);
begin
//设置表的大小
DBGrid1.Width:=ld_table.Width-10;
DBGrid1.Height:=ld_table.Height-120


现在是用主表单中的一个按钮掉用子表单的

procedure Tzygl.Button8Click(Sender: TObject);
var
ld_table:Tld_table;
begin
ld_table:=Tld_table.create(self);
ld_table.showmodal;
end;
但运行时就在
procedure Tld_table.FormCreate(Sender: TObject);
procedure Tld_table.FormPaint(Sender: TObject);
这两个地方报错,不知道这是什么原因。
本人刚学DELPHI,有好多问题不明白,
希望有高手帮帮小弟。。
感谢了!!!!

0 回复
1