Dim MyTextBox(myDataset.Tables(0).Rows.Count ) As TextBox For i = 0 To myDataset.Tables(0).Rows.Count - 1 MyTextBox(i) = New TextBox MyTextBox(i).Parent = Me MyTextBox(i).ReadOnly = True MyTextBox(i).Multiline = True MyTextBox(i).Enabled = False MyTextBox(i).Size = New System.Drawing.Size(... Some Size Here ...) MyTextBox(i).BorderStyle = BorderStyle.FixedSingle MyTextBox(i).TabIndex = 0 MyTextBox(i).TextAlign = HorizontalAlignment.Left MyTextBox(i).Name = "MyTextBox" + i.ToString MyTextBox(i).Text = "MyTextBox_Text_" + i.ToString MyTextBox(i).Font = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) MyTextBox(i).Location = New Point(... Some Location Here ...) AddHandler MyTextBox(i).Click, AddressOf MyTextBox_Click Next
Private Sub MyTextBox_Click(ByVal sender As Object, ByVal e As EventArgs) Dim TxtBox As TextBox = DirectCast(sender, TextBox) MsgBox(TxtBox.Text) End Sub
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
An Experts Exchange subscription includes unlimited access to online courses.Get Started
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE