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
stefilina
0
Newbie Poster
Recommended Answers
Jump to PostDo 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); }
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.