你在竞赛管理详细里面这么做一下,看是否满足你的要求
1、定义一个
private处(全局的)
lFunc1 : TFunc;
2、按下面的代码覆盖你原来的
procedure TJSGLXX_FORM.TreeView1Click(Sender: TObject); //点击目录树
var
lFunc: TFunc;
SUrl: String;
begin
panel3.Visible := false;
if lFunc1 <> nil then
begin
SystemCore.TSystemCore.FuncManager.TerminateFunc(lFunc1, False);
lfunc1 := nil;
end;
if PageControl1.ActivePage <> nil then
begin
if EditForm <> nil then
begin
EditForm.ModalResult := Business.Forms.Controls.mrCancel;
EditForm.Free;
EditForm := nil;
end;
if PageControl1.PageCount > 0 then
PageControl1.Pages[PageControl1.ActivePageIndex].Free;
end;
3、修改成下面的代码
else if TreeView1.Selected.Text = '方案审核管理' then
begin
if not Assigned(EditForm) then
begin
ShowTab;
//FlowParent1 := TitlePanel;
SUrl := 'Biz:\SJZPXZXXTGLXXXT\JSFASHGL_FUNC.FUNC';
//lFunc := SystemCore.TSYSTEMCORE.FuncManager.RunFunc(Context, '', SUrl, '', nil, False);
lFunc := SystemCore.TSYSTEMCORE.FuncManager.RunFunc(Context.Parent, '', SUrl, '', nil, False);
lFunc1 := lFunc;
lFunc.MainForm.Parent := TabSheet;
//EditForm := JSFASHGL_FUNC.TMAINFORM.Create(Self.Context);
//EditForm.Parent := TabSheet;
//EditForm.Show;
end;
end |