tengo este codigo para crear unos objetos dinamicamente y a su vez le genero
el nombre (ej textbox, textbox2,textbox3,etc)
Dim MyComboBox As New ComboBox
GroupBox3.Controls.Add(MyComboBox)
MyComboBox.Location = New Point(16, intItem)
MyComboBox.Name = cbName
cbName = String.Concat(cbName, m.ToString())
m += 1
MyComboBox.Size = New System.Drawing.Size(264, 21)
Dim MyText As New TextBox
GroupBox3.Controls.Add(MyText)
MyText.Location = New Point(368, intItem)
MyText.Size = New System.Drawing.Size(80, 20)
MyText.Name = txtName
txtName = Mid(txtName, 1, 7)
k += 1
txtName = String.Concat(txtName, k.ToString())
Dim MyText1 As New TextBox
GroupBox3.Controls.Add(MyText1)
MyText1.Location = New Point(472, intItem)
MyText1.Size = New System.Drawing.Size(80, 20)
MyText1.Name = txtName
txtName = Mid(txtName, 1, 7)
k += 1
txtName = String.Concat(txtName, k.ToString())
Dim MyText2 As New TextBox
GroupBox3.Controls.Add(MyText2)
MyText2.Location = New Point(760, intItem)
MyText2.Size = New System.Drawing.Size(104, 20)
MyText2.Name = txtName
txtName = Mid(txtName, 1, 7)
k += 1
txtName = String.Concat(txtName, k.ToString())
MyText2.Enabled = False
este codigo lo llamo en el clic de un boton. Lo que necesito hacer es lo
siguiente: a uno de los textbox que creo llevar el producto de los otros dos
(ej: textbox3 = textbox2*textbox) pero con una rutina porque puedo crear
muchos. Tambien necesito con cualquier evento borrar el ultimo grupo creado.
Lo he pensado guardando los nombres en un array, o con el inidice que genera
el ubjeto al crearse pero la verdad no he podido. si alguien me puede ayudar
se lo agradezco muchisimo.
Leer las respuestas