C# form auto resize window

12,874

Solution 1

Use your TextBox's Anchor property. You'll probably want to set it to all sides, Top, Bottom, Left, Right.

Solution 2

If the RichTextBox is the only control you can set it's Dock property to Fill. If it shares the form with other controls you can use the Anchor property.

If you need more help with GUI layout in Visual Studio see Designing Resizable Windows Forms in Visual Studio .NET.

Share:
12,874
John Ryann
Author by

John Ryann

Updated on June 04, 2022

Comments

  • John Ryann
    John Ryann almost 2 years

    I have a form app. inside I have a richTextBox. How to make make the app to auto resize the rich textBOx? meaning if I expand or max the window, rich textBox should follow