Accessing MDI parent controls through child forms,
-
Dear all, i have a problem in accessing the controls on parent mdi form through child form, there are two scenario, 1. Accessing through child form. 2. Accessing through Dialog Form (Modal Forms) which are not child of parent. please if someone have code for the three forms separately, i shall be thankful for that. Bye
-
Dear all, i have a problem in accessing the controls on parent mdi form through child form, there are two scenario, 1. Accessing through child form. 2. Accessing through Dialog Form (Modal Forms) which are not child of parent. please if someone have code for the three forms separately, i shall be thankful for that. Bye
Whenever you are calling a child form from MDI call it like
myChild frm1; //myChild is the ID of your child form frm1 = new frm1(); frm1.ShowDialog(this);
now when you want to access control of MDI from myChild try this((myMDI)(this.Owner)).Label1.Text = "Hi"; // myMDI is your MDI form
-- modified at 1:37 Friday 30th March, 2007Tirtha "A man can ride on your back only when it is bent....."