Dim i As Integer = 0 Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = ChrW(13) Then i = i + 1 Dim txt As New TextBox txt.Location = New Point((i Mod 10) * txt.Width, (i \ 10) * txt.Height) Me.Controls.Add(txt) End If End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = ChrW(13) Then
i = i + 1
Dim txt As New TextBox
txt.Location = New Point((i Mod 10) * txt.Width, (i \ 10) * txt.Height)
Me.Controls.Add(txt)
End If
End Sub