Re: Create UI dynamically
Just like any other objects, TextBoxes get created by invoking the class constructor and then configured by setting properties. You then display it on the form by adding it to the form's Controls collection.
The best way to figure out how to write code to create controls is to create a test app and add your controls in the designer and then simply open the designer code file, which you can access in the Solution Explorer, and read the code. You can then write code to do the same thing.
One thing you may find a bit of a pain is the spacing for multiple controls created at run time. The easiest way to accomplish that is to add a TableLayoutPanel to your form at design time and then add your run time controls to that. It will position the controls automatically.