title: Create multiple textbox dynamically in single form using c#?
body: <p>My aim is to create a .dll file dynamically having TextBox,Button which can be used by anyone in a program using Visual C#. </p>
  
  <p>It would get created in Class Library, No WFA tools would get used.</p>
  
  <p>I need help in creating a form which can generate multiple TextBox according to the attributes provided by the user.</p>
  
  <p>1)No of TextBox
  2)Location
  3)Size etc</p>
  
  <p>Code</p>
  
  <p><strong>CLASS.CS</strong></p>
  
  <pre><code> using System;
   using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.ComponentModel;
  using System.Drawing;
  using System.Windows.Forms;
  using System.IO;
  
  
  namespace Forms
  {
  public class TextForm : Form
  {
      public TextBox txtBox1;        
      public TextForm(int a, int b, int c, int d, string e)
      {
  
          Form f1 = new Form();
          txtBox1 = new TextBox();
          txtBox1.Visible = true;
          //f1.ActiveControl=txtBox1;
          f1.Controls.Add(txtBox1);
          txtBox1.Focus();
          f1.Visible = true;
              txtBox1.Size = new Size(a, b);
              txtBox1.Location = new Point(c, d);
              txtBox1.Text = (e).ToString();
              this.Controls.Add(txtBox1);
              txtBox1.Visible = true;
  
      }
      [STAThread]
      static void Main()
      { 
          Application.EnableVisualStyles();
      }
    }}
  </code></pre>
  
  <p><strong>PROGRAM.CS</strong></p>
  
  <pre><code>using System;
  using Forms;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace WindowsFormsApplication1
  {
  class Program
  {
  
      [STAThread]
      static void Main()
      {
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
          TextForm Box1 = (new TextForm(150, 14, 20, 32, "This is a TextBox 1"));
          TextForm Box2 = (new TextForm(180, 34, 40, 52, "This is a TextBox 2"));
  
      }}}
  </code></pre>
  
  <p>What should be the code? </p>