0

Hy, could anyone please told me how can i move controls on a windows form when i click for example, on a button?
When i click on a button i want to increase the height of my form and move a textbox and label a little down...
Please help.Thanks

2
Contributors
2
Replies
5
Views
6 Years
Discussion Span
Last Post by stefilina
0

Do something like this:

private void button1_Click_1(object sender, EventArgs e)
        {
            // increment form height by 20
            this.Height += 20;
            //change heigth and location of button clicked
            Button btn = sender as Button;
            btn.Height += 10;
            btn.Location = new Point(50, 50);
        }
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.