Reputation: 1
I have a program that has 1 button I would like to make it so I can click one button and place 2 buttons in that window that pops up then 2 more per button etc.
I am using Microsoft Visual C# 2008 express edition.
Upvotes: 0
Views: 98
Reputation: 137418
Do you always know the text on the buttons and what you want them to do on the new window? If it is always going to be the same, this isn't hard. You'll want to add a new Form to your solution, and use the designer to add the buttons and program their functionality.
The code to show this new form is:
MyNewForm form1 = new MyNewForm();
form1.Show();
//or
form1.ShowDialog();
Upvotes: 1