Création d'une série de textBox avec une code en vb.net
Bonjour, J'espére que vous pouvez m'aider voila mon probléme : j'ai la code suivante
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
Dim N As Integer
Private Sub Lool_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Lool.TextChanged
N = CInt(Lool.Text)
'Dim TextBox As New System.Windows.Forms.TextBox()
'TextBox.Left = 100
' TextBox.Top = 100
' Controls.Add(TextBox)
' TextBox.Text = N
' TextBox.Name = "textbox" & i
For i = 1 To N
Dim TextBox(i) As System.Windows.Forms.TextBox
'Dim TextBox As New System.Windows.Forms.TextBox()
Controls.Add(TextBox(i))
'TextBox(i).Left = 100
'TextBox(i).Top = i + 100
Dim x As Integer
Dim Y As Integer
x = 100 * i
Y = 100 * i
TextBox(i).Left = x
TextBox(i).Top = Y
TextBox(i).Name = "Textbox" & i
TextBox(i).Text = i
Next i
End Sub |
normalement elle marche mais malheureussement il ne fonctionne pas