Home > Back-end >  RzPageControl docked window Error when the Error saving device context
RzPageControl docked window Error when the Error saving device context

Time:09-20

Doing a car park control system, the main interface is a middle RzPageControl, a Tabsheet for monitoring card paging, which display monitor screen, click on the button "discrepancy record", will determine whether there is a discrepancy in the RzPageControl record paging, there have been added in the RzPageControl a paging "discrepancy record"
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 before

CodePudding user response:

Can try in Cx

CodePudding 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!
  • Related