0
I have multiple windowsforms inside a Splitcontainer, one of them, owned a Listbox.
That is, outside the Splitcontainer, in Form1, has button, when you click on it, I want to add a text in the Listbox inside the Splitcontainer in Form2
When I click the button, nothing happens! < Here is the error.
Private Sub form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim form2add As New Form2
form2add.TopLevel = False
SplitContainer1.Panel2.Controls.Add(form2add)
form2add.Show()
Dim form3add As New Form3
form3add.TopLevel = False
SplitContainer1.Panel2.Controls.Add(form3add)
form3add.Show()
Dim form4add As New Form4
form4add.TopLevel = False
SplitContainer1.Panel2.Controls.Add(form4add)
form4add.Show()
End Sub
Button1 code (ERROR is here):
Form2.ListBox1.Items.Add("Texto a ser adicionado")