1. Field description:
My main interface is mdicontainer (FA ),
Click a menu to open a showdialog form (FB): FB. showdialog ();
After running FB, another new form (FC) is opened and FB is disabled,
It is required that FC be a sub-form of FA after running.
So I have to pass FA to FC through FB: fc. mdiparent = FB. parentform;
However, FB. parentform is always null, and later I found that there is another property owner,
So FC. mdiparent = FB. owner; traceProgramStill blank, depressing ~~~~
Can't you solve this problem? But does the SQL Server 2000 query analyzer do ~~!!
2. Turning Point:
The last thing I know is that my showdialog method is incorrect!
In fact, there is another overload method for showdialog !!
Form. showdialog method (iwin32window)
Display the form as a mode dialog box with the specified owner.
ParametersOwner:
Any object that implements iwin32window (indicating that the top-level window of the mode dialog box will be available.
3. Result:
RewriteCodeFB. showdialog (FA );
FC. mdiparent = FB. owner;
Finally run successfully. After interface B is closed, interface C becomes a subinterface of interface.