The code is as follows:
Procedure TFrmMain. PageAddForm (aPage: TRzPageControl; AForm: TForm; TaFormClass: TClass; FormName: string);
The begin
Try
Application CreateForm (TComponentClass (TaFormClass), aForm);
APage. UseDockManager:=True;
LBInterface. Log. WriteLog (' 3: + IntToStr (aPage. PageCount) + FormName, 3);
AForm. ManualDock (aPage, nil, alClient);//(aPage);//fusion to pageControl,
LBInterface. Log. WriteLog (' 4: '+ IntToStr (aPage. PageCount) + FormName, 3);
AForm. Caption:=FormName;
AForm. Position:=poMainFormCenter;
AForm. Visible:=True;//this better than the show
APage. ActivePageindex:=aPage. PageCount - 1;
//TODO - Eternally: PageAddForm default body inserted
Except,
On E: the Exception do
The begin
LBInterface. Log. WriteLog (' 9: '+ e.M essage, 3);
end;
end;
end;
System is running after a period of time to click "in and out record", execute to aForm. ManualDock (aPage, nil, alClient) cannot add paging, program without an Error, there are 9: memory Error log Error saving device context,
CodePudding user response:
Should be the problem of RzPageControl itself, I use RzLabel had seen similar problems beforeCodePudding user response:
Can try in CxCodePudding user response:
APage. UseDockManager:=True; This sentence can not compile, TRzPageControl without this property, in addition to this, post code can be normal execution, according to the description of the building Lord, have taken place in the actual error, just be the exception handling statements output to the log, not in the IDE debugging, located so it is much harder for output, problem could be outside these code or a version of the bug,CodePudding user response:
Produced complete code, check it out!