I find several, are not reliable, not to say that not reliable, I feel too cumbersome
Two. The parent window passes through the child window, there are two ways (I think the relatively simple method ha),
1 The first method: Create a new property in a Subwindow, and then create a new method, of course, by displaying the properties of a form control (such as a TextBox);
The child window is then instantiated in the parent window and then invoked with the instantiated child window property, assigning a value to the property, then invoking the method that instantiates the child window, and then displaying the child window
2 The second method because you want to pass parameters, must have an action, and run the program, in the parent window when the child window can be initialized in the initialization of the child window assignment (search function in Word, you select a paragraph of text, then click Search, you try not to see I say here)
1. Add parameters directly to the initialization subwindow (the form's constructor) and assign the parameters to the Subwindow control (e.g. textbox) in the function
Public B (String canhu)
{
InitializeComponent ();
TextBox1.Text = Canhu;
}
2 "When instantiating a subform in a parent form, write the parameter directly in the parameter (b b = new B (TextBox1.Text);)
It's simply not the source code.
Three. The child window passes through the parent window, because it is passed when the child window is opened, so when the parent window is instantiated, the form to be passed is indicated, because instantiating a form can be any form, or the subform itself, so it doesn't make sense to pass it.
Cond.......
AB form cross-transfer parameters