I have a MDi Parent Form represent Student Details and a MDi child form to Display the information.
How can pass MDi Parent form Data to its MDi Child Form.
There is a button 'Next' in Parent Form.
when i click the that button, I want to display values of parent from in child form.
how can it possible?
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

VulpesPosted May 16, 2013, 8:23 AM
You can either save a reference to the child form in a field of the parent form, when you create the child, or you can get it from the parent's MdiChildren property.
If there's only one child, the latter is the easiest way.
The control or controls in which you want to display the data on the child form also need their Modifiers property changed from private to internal so that they are directly accessible from other forms in the application.
For example, suppose there's only one child form whose class name is Form2 and which has a textbox ( textBox1) in which you want to display some data already displayed in a label (label1) on the parent form. The following code should do it:
Form2 f2 = (Form2)this.MdiChildren[0];
f2.textBox1.Text = this.label1.Text;