I have a program (code below) which has a main screen with a button, a
tabcontrol and a couple of tab pages. I have two pre written forms that i
then put onto the tab pages. The problem i have is when i exit the forms in
the tabs i want to clear the text out of the tabpage (which is set in the
code below when they are loaded) but i cannot do it from the form as it won't
allow me at it and i have no way of actioning it back on the main screen when
one of the forms is exited.
Any help?
Public Class Form1
Inherits System.Windows.Forms.Form
" Windows Form Designer generated code "
Dim frm2 As New Form2
Dim frm3 As New Form3
Private Sub cmdLoad2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdLoad2.Click
frm2.TopLevel = False
frm2.Size = New Size(730, 340)
frm2.Visible = True
TabPage1.Controls.Add(frm2)
frm3.TopLevel = False
frm3.Size = New Size(730, 340)
frm3.Visible = True
TabPage2.Controls.Add(frm3)
TabPage1.Text = "This is form 2"
TabPage2.Text = "This is form 3"
End Sub
End Class