title: How can I add a new Windows Form and then add a PictureBox programmatically?
body: <p>I'm looking to learn how to add a new form to my application programmatically &amp; then add a picture box, text box, and a button to that new form?</p>
  
  <p>I can add a new button, a new form, or a new picturebox on my current form but I can't seem to figure out how to add a new form to my application and then put the picturebox and textbox and the button on that new form.</p>
  
  <p>What am I missing?</p>
  
  <pre><code>'Form2
  Dim form2 As New Form
  form2.Size = New System.Drawing.Size(500, 500)
  form2.Show()
  Dim picturebox1 As New PictureBox()
  Dim Textbox1 As New TextBox()
  Dim Button1 As New Button()
  CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
  Me.SuspendLayout()
  '
  'PICTURE BOX  PROPERTIES
  '
  picturebox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
  picturebox1.Location = New System.Drawing.Point(11, 12)
  picturebox1.Name = "PictureBox1"
  picturebox1.Size = New System.Drawing.Size(365, 124)
  picturebox1.TabIndex = 0
  picturebox1.TabStop = False
  picturebox1.Show()
  
  'TEXTBOX PROPERTIES
  
  Textbox1.Location = New System.Drawing.Point(12, 142)
  Textbox1.Name = "TextBox1"
  Textbox1.Size = New System.Drawing.Size(364, 20)
  Textbox1.TabIndex = 1
  Textbox1.Show()
  
  
  'BUTTON PROPERTIES
  Button1.Location = New System.Drawing.Point(128, 172)
  Button1.Name = "Button1"
  Button1.Size = New System.Drawing.Size(95, 24)
  Button1.TabIndex = 2
  Button1.Text = "Submit"
  Button1.Show()
  
  
  
  
  Me.Controls.Add(picturebox1)
  Me.Controls.Add(Textbox1)
  Me.Controls.Add(Button1)
  </code></pre>