i am using the mdi functionality in my winforms app. If i open a childform in maximized state, the text of the childform will appear in the text of the parent mdi form. How can i disable this so that the text of the parent mdi form will always stay the same?
1 Answer, 1 is accepted
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Sep 2022, 05:20 AM
Hello, Paul,
I would like to note that the standard MS Form behaves in a similar way in a MDI scenario:
The parent form's text is changed when the MDI child is maximized.
Feel free to use Stackoverflow and MSDN for general programming questions like this.
However, I have prepared a sample code snippet for your reference demonstrating how to manage the text of the MDI parent when the child is maximized:
publicForm1()
{
InitializeComponent();
this.IsMdiContainer = true;
Form f = new Form();
f.SizeChanged+=f_SizeChanged;
f.Text = "Child";
f.MdiParent = this;
f.Show();
}
privatevoidf_SizeChanged(object sender, EventArgs e)
{
Form f = sender as Form;
if (f.WindowState == FormWindowState.Maximized)
{
f.Text = "";
}
else
{
f.Text = "Child";
}
}
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik