i have two forms(Form1 and Form2)..i open form2 like below
Form2 frm2 = new Form2();
frm2.MdiParent = this.MdiParent;
frm2.Show();
when i minimize Form2 it goes to taskbar but i want Form2 to be seen in Form1 as minimized..how can i do that ?
Loading
Tanmay SarkarPosted Oct 23, 2010, 3:46 PM
Due to your code, the form is not mdi child (as it not open in container form).
you should try this,
Form2 frm2 = new Form2();
frm2.MdiParent = this;
frm2.Show();
and never forget to set form1, this.IsMdiContainer = true;
you may check it in properties window.
i also upload a sample code (vs-2010)
hope this help you!
Thank you.
If it help you then mark it as an answer.
Tanmay SarkarPosted Oct 30, 2010, 10:24 AM
Erdinc KolukisaPosted Oct 30, 2010, 8:46 AM
Tanmay SarkarPosted Oct 30, 2010, 3:07 AM
private void Form1_Load(object sender, EventArgs e)
{
MdiClient Form1;
foreach (Control my_control in this.Controls)
{
try
{
Form1 = (MdiClient)my_control;
Form1.BackColor = this.BackColor;
}
catch
{
}
}
}
and run it. you get your color.
see also the sample which i upload.
Thank you.
Tanmay SarkarPosted Oct 26, 2010, 11:07 PM
Yes you can change color also, go through the from properties & you get color option. I think you probably solve it.
Thank you!
Erdinc KolukisaPosted Oct 25, 2010, 9:16 AM
but now i have one more question..my form color looks Gray after changing isMdiParent to true..is it possible to change it to another colors or should i use it like that ?