You don't really need to bother with an array to store the controls in. The form itself will kinda act like the array that you'll add controls in.
Although you shouldn't really go messing about with it, this is one of the times when it's worth looking at the Form's Designer.vb file to see what code VB generates to add controls to a form. You can then copy that code yourself for adding your own controls.
So, for example, start a new windows application project and add a textbox to the form. Over on the Solution Explorer, look for the button at the top that's Show All Files and click it. Your form should get an expandable plus sign next to it. Expand it and you should see the Form1.Designer.vb file. Open that file and you'll see the code that VB has automatically created for adding the textbox you added to the form. It should look similar to...
Code:
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(13, 13)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(100, 20)
Me.TextBox1.TabIndex = 0
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(284, 262)
Me.Controls.Add(Me.TextBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
The important part from that code that you're missing in your code is the Me.Controls.Add(Me.TextBox1) that actually adds the control to the form.
So, scrapping the array that's not needed, the code that should do what you're trying to do would be...
Code:
Private Sub Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim width As Integer = Me.Width
Dim numberoftxtboxes As Integer = width / 600
Dim i As Integer = 0
Dim txt As TextBox ' You only need one object that will keep getting recreated for new textboxes.
Do While i < numberoftxtboxes
txt = New TextBox
' You should probably give the control a name
txt.Name = "Textbox" & i.ToString
txt.Size = New Size(600, Me.Height - 135)
txt.Visible = True
txt.Parent = Me
txt.Multiline = True
txt.BringToFront()
txt.Text = ""
If i = numberoftxtboxes - 1 Then
txt.ScrollBars = ScrollBars.Vertical
End If
If i = 0 Then
txt.Location = New Point((Me.Width - numberoftxtboxes * 600 - (numberoftxtboxes - 1) * 10) / 2, 60)
Else
txt.Location = New Point((Me.Width - numberoftxtboxes * 600 - (numberoftxtboxes - 1) * 10) / 2 + i * 600 + i * 10, 60)
End If
me.controls.add(txt)
i += 1
Loop
End Sub