J
Jrosion
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TNormalFun.ShowForm(FormName: String; TabPage: TPageControl);
var
ObjCom: TComponent;
Fromstr: String;
begin
Fromstr := FormName;
ObjCom := Application.FindComponent(Fromstr);
if TForm(ObjCom) <> nil then
begin
try
if not assigned((ObjCom as TForm)) then
begin
try
//怎么在这里创建一下窗体就是,用application.create()命令来创建
//例如:
// Form2:= TForm2.Create(Self);
// Form2.Show;
// Form2.ManualDock(PageControl1);
//怎么实现Form2:= TForm2.Create(Self);这句怎么实现。
(ObjCom as TForm).Show;
(ObjCom as TForm).ManualDock(TabPage);
finally
end;
end;
end;
end;
var
ObjCom: TComponent;
Fromstr: String;
begin
Fromstr := FormName;
ObjCom := Application.FindComponent(Fromstr);
if TForm(ObjCom) <> nil then
begin
try
if not assigned((ObjCom as TForm)) then
begin
try
//怎么在这里创建一下窗体就是,用application.create()命令来创建
//例如:
// Form2:= TForm2.Create(Self);
// Form2.Show;
// Form2.ManualDock(PageControl1);
//怎么实现Form2:= TForm2.Create(Self);这句怎么实现。
(ObjCom as TForm).Show;
(ObjCom as TForm).ManualDock(TabPage);
finally
end;
end;
end;
end;