A set of .NET Framework managed libraries for developing graphical user interfaces.
Hi SaravananGanesn-3331,
First, you can give your textbox control a name for easy searching later.
textBox.Name = "t1"
And the you need to cast the control in the TabPage back to Form before you can access the property.
Please refer to the following code example:
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
If tabControl1.SelectedTab IsNot Nothing Then
If tabControl1.SelectedTab.Controls.Count > 0 Then
If TypeOf tabControl1.SelectedTab.Controls(0) Is Form Then
Dim f2 As Form = CType(tabControl1.SelectedTab.Controls(0), Form)
label1.Text = f2.Controls.Find("t1", True).FirstOrDefault().Text
End If
End If
End If
End Sub
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.