I have multiple windowsforms inside a SplitContainer, one of them, I have a ListBox.
That is, outside the SplitContainer, on Form1, has button, when I click it, I want to add a text in the ListBox inside the SplitContainer on Form2
When I click the button, nothing happens! < Here is the error.
Form1Load:
PrivateSubform1_Load(senderAsObject,eAsEventArgs)HandlesMyBase.LoadDimform2addAsNewForm2form2add.TopLevel=FalseSplitContainer1.Panel2.Controls.Add(form2add)form2add.Show()Dimform3addAsNewForm3form3add.TopLevel=FalseSplitContainer1.Panel2.Controls.Add(form3add)form3add.Show()Dimform4addAsNewForm4form4add.TopLevel=FalseSplitContainer1.Panel2.Controls.Add(form4add)form4add.Show()EndSub
Button1code(ERRORishere):
Form2.ListBox1.Items.Add("Texto a ser adicionado")