我是 .NET 编程的新手。
我需要在运行时创建多个 TextBoxies。
我有以下 VB NET 代码:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim textbox1 As New TextBox
static Dim shiftDown As Integer
static Dim counter As Integer
counter += 1
shiftDown = shiftDown + 30
textbox1.Name = "Textbox" + counter.ToString()
textbox1.Size = New Size(170, 10)
textbox1.Location = New Point(10, 32 + shiftDown)
textbox1.Visible = True
GroupBox1.Controls.Add(textbox1)
End Sub
此代码示例在单击 Button1 后在运行时在窗体上创建多个文本框。
我的问题是单击按钮后创建的文本框存储在哪里?