Home > Back-end >  Delphi 7 forms to create problems
Delphi 7 forms to create problems

Time:10-01

I created in this function frmTaskTip forms, but the execution of the frmTaskTip:=TfrmTaskTip. Create (Application) that is directly into the frmTaskTip onshow event, anxious for me
Procedure TfrmMain. ShowTaskTips;
The begin
If not Assigned (frmTaskTip) then
FrmTaskTip:=TfrmTaskTip. Create (Application);
FrmTaskTip. FDM:=FDM;
FrmTaskTip. The FUser:=the FUser;
//frmTaskTip. ShowTips;
FrmTaskTip. Show;
end

CodePudding user response:

You mean that the call is performed OnShow before the Show? It's not science, execution is OnCreate

CodePudding user response:

Breaking point debugging, form OnCreate execution sequence of events, OnShow,,,,

CodePudding user response:

Through learning

CodePudding user response:

Delphi compiler or trustworthy, sure is not the problem of Delphi, a good debugged,

CodePudding user response:

What do you think, code the appearance of the normal amount ~

You create will not have any other place?

Or breakpoint tracking, or, showmessage, after a statement, add showmessage ()

See where it was at work

CodePudding user response:

Check the TfrmTaskTip, define whether there is a problem,

CodePudding user response:

You use the child form type of form?

CodePudding user response:

Mdi child form showform events will be automatically after createform
After createform is introduced into the variable value, you want to call in showform incoming variables, but for an mdi child window, it's not
That is an mdi child window showform event is a decoration

The solution is to put your purpose onshow event the code to a custom function
Createform
Incoming parameters
Call the custom function
  • Related