Here is a thing. I have three forms, a MDI container, child1 and child2. Now i want to pass some text box value from child1 to child to while both are in the MDI container form.
problem....
1. I can pass the data but when child2 pops up it will be out of MDI container.
2. when i create a new instance of child2 by making it MdiParent i get error saying child one is not a mdicontainer.
I'm sure u gon figurout what i mean. Here is the code.
on child1 form
child1 w = new child1();
w.MdiParent = this;
w.CodeText = txtcode.Text;
w.Show();
on child2 form
public String CodeText
{
get { return label1.Text; }
set { label1.Text = value; }
}
string name = lable1.text;
pls help!!!
Loading
Hirendra SisodiyaPosted Mar 29, 2010, 8:08 AM
i think you are open child2 form child1 so you can use this :
child2 w = new child2();
w.MdiParent = this.MdiParent;
w.CodeText = txtcode.Text;
w.Show();
thanks
Please mark as answere if it helps