.NET 2.x Изменение размера окна - C#

Узнай цену своей работы

Формулировка задачи:

Скажите пожалуйста как сделать чтобы при изменении размера формы изменялись размеры и других элементов?

Решение задачи: «.NET 2.x Изменение размера окна»

textual
Листинг программы
        private void Form1_SizeChanged(object sender, EventArgs e)
        {
            this.richTextBox1.Location = new Point(5, 5);
            this.richTextBox1.Width = this.ClientRectangle.Width - 10;
            this.richTextBox1.Height = this.ClientRectangle.Height - 15 - button1.Height;
            this.button1.Location = new Point(this.ClientRectangle.Width - 5 - this.button1.Width, this.ClientRectangle.Height - button1.Height - 5);
            this.button2.Location = new Point(this.button1.Left - 5 - this.button2.Width, this.ClientRectangle.Height - button2.Height - 5);
            this.button3.Location = new Point(this.button2.Left - 5 - this.button3.Width, this.ClientRectangle.Height - button3.Height - 5);
            this.button4.Location = new Point(this.button3.Left - 5 - this.button4.Width, this.ClientRectangle.Height - button4.Height - 5);
        }

ИИ для рефератов и докладов


  • Экспорт Word по ГОСТу
  • Минимум 80% уникальности текста
  • Поиск релевантных источников в интернете
  • Готовый документ за 2 минуты

Оцени полезность:

7   голосов , оценка 4.286 из 5
Похожие ответы