var
i:integer;
fclass:Tformclass;
begin
for i:=0 to screen.FormCount-1 do
begin
if screen.Forms[i].Caption='form3' then
begin
if screen.Forms[i]=nil then
begin
tform(fclass):=screen.Forms[i].Create(application);
//application.CreateForm(screen.Forms[i],class);
tform(fclass).Parent:=panel2;
screen.Assign(tform(fclass));
tform(fclass).Show;
end;
end;
end;
end;
创建的窗体不能显示!!那里错了!?
i:integer;
fclass:Tformclass;
begin
for i:=0 to screen.FormCount-1 do
begin
if screen.Forms[i].Caption='form3' then
begin
if screen.Forms[i]=nil then
begin
tform(fclass):=screen.Forms[i].Create(application);
//application.CreateForm(screen.Forms[i],class);
tform(fclass).Parent:=panel2;
screen.Assign(tform(fclass));
tform(fclass).Show;
end;
end;
end;
end;
创建的窗体不能显示!!那里错了!?
解决方案 »
- 执行时的程序怎样取得?
- ?在ListView(viewStyle = vsReport)中的SubItem(非第一列)中怎样加入checkbox?急急
- ★★★求助★★★
- 一个土制的多语言引擎 Langine,希望能借此简化编写多国语言系统的工作
- !!!!!!!!!!!!!!!!!!!请问资源泄露问题!!!!!!!!!!!!!!!!
- ~~~~~~~~~请大家帮帮小弟,过来看看,不够再加。~~~~~~~~
- 取网络时间为什么不行?
- Delphi链接ACCESS数据库问题(有代码)
- 有谁用delphi做过发送邮件的程序?
- Delphi中如何取得服务器的时间?
- 第一行“=”附近有语法错误
- 请问能把DLL中的一个类导出吗?然后在另一个delphi应用程序中使用该类创建对象。
这个条件不成立,所以你的if.. then块的代码根本就没有执行。PS:假设这个条件成立,那么程序就会报错,因为你在这个判断之前有“ if screen.Forms[i].Caption= 'form3 ' then
”与你的判断条件“ if screen.Forms[i]=nil then ”矛盾。
........
end;
逻辑没理顺,是不是初学者?
《VCL架构剖析》
《delphi源代码分析》
《delphi面向对象编程思想》
《delphi设计模式》
《master delphi7》
《delphi_threads》
最好是在盒子上(www.2ccc.com)多下几个例子,自己练练手
《VCL架构剖析》
《delphi源代码分析》
《delphi面向对象编程思想》
《delphi设计模式》
《master delphi7》
《delphi_threads》
最好是在盒子上(www.2ccc.com)多下几个例子,自己练练手Bear_hx 说得没错,先看这几本书吧,还有Delphi5、6开发人员指南,这两本书也不错的。
i:integer;
fclass:Tformclass;
begin
if not assinged(form3) then
begin
tform(fclass):=screen.Forms[i].Create(application);
//application.CreateForm(screen.Forms[i],class);
tform(fclass).Parent:=panel2;
screen.Assign(tform(fclass));
tform(fclass).Show;
end;
end;