|
Okay just a quick question, and hopefully a quick solution. I currently have a main mdi form and two child mdi forms. My objective is to get one of the child forms to open through a button click on the other. So say the user runs the program, they see a blank form, then they click on a button and one of the child forms opens. Inside that form is another button that is supposed to open another child form, but who's parent is the main form. My problem is, this doesn't happen. The form doesn't open, and nothing appears to happen.
Here is my code:
--MAIN FORM-- Public Sub LoadMDIChild(ByVal NewMDIChild As Form) If NewMDIChild Is Nothing Then NewMDIChild.MdiParent = Me NewMDIChild.Dock = DockStyle.None End If NewMDIChild.Show() NewMDIChild.BringToFront() End Sub
--SUB1-- Dim frmViewAll As New frmViewAll() Dim frmMain as new frmMain() frmMain.LoadMDIChild(frmClientsViewAll)
If anyone could help it would be greatly appreciated.
Thanks,
Dave |