5,927
社区成员




procedure TShowPathFrm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=caFree;
end;
4、
procedure TShowPathFrm.FormDestroy(Sender: TObject);
begin
ShowPathFrm:=Nil;
end;
5、BordStyle := bsNone;
6、Option-Forms设置子窗体:Available forms
二、主窗体
1、加入PageControl
2、增加一个Page
3、调用打开(窗体)事件
procedure TMDIMainFrm.Button1Click(Sender: TObject);
begin
if not Assigned(ShowPathFrm) then
ShowPathFrm:=TShowPathFrm.Create(nil);
try
ShowPathFrm.ManualDock(PageControl1.Pages[0]); // 嵌入PageControl1.Pages[0]
ShowPathFrm.Show;
except
ShowPathFrm.Close;
Exception.Create('Error');
end;
end;
procedure TShowPathFrm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=caFree;
end;
4、
procedure TShowPathFrm.FormDestroy(Sender: TObject);
begin
ShowPathFrm:=Nil;
end;
5、Option-Forms设置子窗体:Available forms
二、主窗体
1、加入PageControl
2、增加一个Page
3、调用打开(窗体)事件
procedure TMDIMainFrm.Button1Click(Sender: TObject);
begin
if not Assigned(ShowPathFrm) then
ShowPathFrm:=TShowPathFrm.Create(nil);
try
ShowPathFrm.ManualDock(PageControl1.Pages[0]); // 嵌入PageControl1.Pages[0]
ShowPathFrm.Show;
except
ShowPathFrm.Close;
Exception.Create('Error');
end;
end;