新手第一贴 动态创建控件的问题
Dim b As Integerfor b =1 to 5
Dim a As New TextBox
a.Name = "文本" & b
a.Location = zbx1
a.Height = 10
a.Width = 25
Me.Controls.Add(a)
next
创建了五个文本框,窗体上有一个按钮,怎么在按下后获得其中一个文本框中的text值,比如说"文本5"的text值,
中
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dim a as string
dim b as string
dim c as string
dim f as integer
for f =1 to 3
a= 文本& f.text
b= 文本& f.text
c= 文本& f.text
next
end if
这么写通不过去
大家给指点一下,怎么办?