I have an mdi parent form with multiple child forms. From one child form (FormA) I select a treeview node. On another child form (SummaryForm) I have panels. I want to display a third form (formC) in the panel and pass it a value. I use the following code in FormA:
Dim accountName As String = e.Node.Text
Then is SummaryForm:
Public Sub FilterAccounts(ByVal accountName As String)
Dim anAccountInfoForm As New AccountInfoForm()
aCrmData = New CrmDataClass
aCrmDataSet = aCrmData.getCrmDataSet
AccountsBindingSource = New BindingSource
.AccountFilter = accountName
AccountsBindingSource.Filter = "Name = '" & accountName & "'"
.NameTextBox.DataBindings.Add("text", AccountsBindingSource, "Name")
.TopLevel = False
.Dock = DockStyle.Fill
.FormBorderStyle = Windows.Forms.FormBorderStyle.None
At runtime nothing happens, no exceptions, and the panel does not fill with the new form. What am I doing wrong?