I found a problem, problem description,
Form1 is the main form MDI, Form2 is an MDI child window, Form2 transferred to manually create in the options at the same time,
In Form1 put a Button Button, click this Button to appear Form2. I added in the Button Button to create Form2 statements, the following
TForm * pform;
Pform=new TForm2 (this);
Pform - & gt; Show ();
Question, if the third sentence statement pform - & gt; Show (); , Form2 or display properly, I show function in Form2 lower-middle breakpoints, found that the show Form2 function after execution to the second statement is executed, I am strange, this pform - & gt; Show (); Have a purpose??? Please down to solve,
Supplement: I mainly want to perform some operations in Form2 show function, with the value of the some controls in Form2 inside,
CodePudding user response:
Not surprisingly, MDI child form can need not Show because, Visible is always TrueCodePudding user response:
TForm Show function is the Visible attribute set to true then BringToFrontIf TForm fsMDIChild FormStyle property values, then the internal is the Visible attribute to true, so after creating an MDI child window, do not need to call the Show function, this form has been in a state of visual,