i create MDI Application.
i have propblem with changing the property of the active child.
I make two form .
form one -->is mdi container and have a menustrip1 witch contain
top-levelmenue(file,window,color,...)
form2-->have a textboxwothmultiline.
-----------
in file menu--> (new and close.)as example
* new make newMDI child
with this code
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 obj = new Form2();
obj.MdiParent = this;
obj.Text = "documnet" + i; //i to numerize the documnet
obj.Show();
i++;
}
*close to close the apllicatin
---------
in Color menu
there is (red ,greev,yelloo) to change the fore color of the textbox of the
current activMDI child.
i used in VS2003 to do it in this way
Code:
private void menuItem11_Click(object sender, System.EventArgs e)
{
((Form2)ActiveMdiChild).textBox1.BackColor =Color.Red;
}
This dosn't work with me , and also all property that i want to change in
the avtivemdi child.
and tell me this Erroe msg:
Projectname.form2.textbox1 is inaccessible due its protection level .
i try many sloution but all dosn't work
plz someone help me eith this and tell me the code so ican use it with all
other properties.
Thnax to all.
Islam Khalil,
Regards.