Home > database >  The parent window, the child window
The parent window, the child window

Time:09-26

A framework of MDI window for the main! B window for child! Window type, c is the main!

By opening a window and c MDI menu window
1 b from a window to open the window, and then after the input data in b window hidden window, b is not closed window b
2. A window called b code of the window to openwithparm (b, ' ', the parent)
3. When closing a window
4. Check the c window isvalid (b), incredibly b window is open, that is to say, b window is not closed, with a window closed
5. Can you tell me how can this mode in the window, a window closes at the same time close b b window can't I use the response window type

As well as in the mdi frame, hidden child window, how to make the parent window to get the focus (the calling code to get the b window's parent window is an mdi frame window, rather than a window)
Similarly, if not the mdi frame, hidden child window, how to make the parent window get focus

Write a bit more, a little around, also please have a look at carefully, thank you!

CodePudding user response:


2. A window called b code of the window to openwithparm (b, ' ', the parent)

This code is written in the where?

CodePudding user response:

A window of the button clicked

CodePudding user response:

Try it can use setparent API,

Is in no way can when closing a window to take the initiative to close b window, as long as it can realize the function is not to go,

CodePudding user response:

Recommendations will be integrated into A and B the same window,
But to open different DW control,
Point A, B will be hidden,
When you start the B, will be A hidden,
This convenient call information,
And closing can close together,
Won't have this problem,
Save personal advice...

CodePudding user response:

refer to the original poster zxssy response:
5. Could you tell me how can this mode in the window, a window closes at the same time close b b window I can't use the response window these types

If you don't want to use the response window type, you can put the window is set to popup b type, close a window at the same time also can close window, b

refer to the original poster zxssy response:
as well as in the mdi frame, hidden child window, how to make the parent window focus


You can set the parent window specified in the hidden behind the child window code, and placed at the top

CodePudding user response:

The close of the event in a window to write
Then Close the If Isvalid (b) (b)

After hidden child window, how to let the parent window get focus
ParentWindow ()//get the parent window,
Choose caseParentWindow (.) windowtype
Case mdi! , mdihelp!
.
Case the main!
.
The End choose

CodePudding user response:

Estimate your a window is opensheet open () way, and form the window can't be any other window's parent window; So although you opened a child type of window and set a is the parent window, but it's actually a cannot become the parent window, so is only a parent window mdi as the parent window of b,

If a certain form window:
Q.1 a window active close b window
Q.2 when a window open b put some control passed as a parameter to b, when b window hidden active set the control gains focus,
  • Related