0

Hello Everyone, I have an MDI form which works fine. At startup the childform opens and its windowstate is maximized. In the childform I have a textbox but does not have a windowstate to maximize. How can I maximize the textbox with the childform?

This is my formload:

private void TextEditorForm_Load(object sender, EventArgs e)
        {
            ChildForm childOneForm = new ChildForm();
            childOneForm.MdiParent = this;
            childOneForm.Text = "Welcome " + DateTime.Now + ChildOneCounterInteger.ToString();
            childOneForm.Show();
            childOneForm.WindowState = FormWindowState.Maximized;
            
        }

The childform window opens in a maximized state, but how can I make the textbox to open with the childform?

Thanks for your response. Well appreciated.

Edited by bravo659: n/a

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by bravo659
0

>but how can I make the textbox to open with the childform?

Set Doc property of TextBox.

textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
0

>but how can I make the textbox to open with the childform?

Set Doc property of TextBox.

textBox1.Dock = System.Windows.Forms.DockStyle.Fill;

Hello adatapost,
Thanks for your feedback that is it. Got it working. I am here looking at the other docking of four corners and forgot all about the dock to fill. Thanks again. I didn't know you could do it programmatically.

Desi Bravo

Edited by bravo659: spelling typo

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.