How to create Command Buttons during Runtime on a Form1 by Clicking a Button1 on Form1
Posted on 2010-11-27
I need help with the click event of a Button1 on a Form1 in a Visual Basic Project in Visual Studio 2008. I would like to be able to create three command Buttons (with Click Events) on Form1 by clicking Button1 on Form1.
The names of the three Command Buttons created during Runtime on Form1 should be Button2, Button3 and Button4. Clicking Button2 should show a message box saying “Button2” and clicking Button3 should show a message box saying “Button3”.
The text property of Button2 should be “Button Two” and the text property of Button3 should be “Button Three”.
Many thanks for your help in anticipation.