Hier mal ein Beispiel als Anregung:
Option Infer On ' Only VB9
Option Strict On
Public Class Form1
Dim WithEvents tb As New TextBox With {.Dock = DockStyle.Top}
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles Me.Load
Me.Controls.AddRange(New Control() {tb})
End Sub
Private Sub tb_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tb.KeyDown
If e.KeyCode = Keys.Enter Then
Dim n As Integer = 0
Integer.TryParse(tb.Text, n)
For i = 1 To n
Dim tb1 As New TextBox With {.Width = 20, .top = i * 30 + 30, .Left = 20}
Dim tb2 As New TextBox With {.Width = 40, .top = i * 30 + 30, .Left = 50}
Me.Controls.AddRange(New Control() {tb1, tb2})
Next
End If
End Sub
End Class
--
Peter