J
John
Hi
I have this sub in a main form;
Sub OpenForm(ByVal x As String)
Select Case x
Case "1"
form1 = New frmClients
form1.TopLevel = False
Me.FormsPanel.Controls.Add(form1)
form1.Show()
form1.BringToFront()
Case "2"
form2 = New frmContacts
form2.TopLevel = False
Me.FormsPanel.Controls.Add(form2)
form2.Show()
form2.BringToFront()
End Select
End Sub
I first call the sub in the main form as OpenForm("1") which creates the
first child form1. Now in form1 I call the same sub as;
dim frm as new frmMain
frm.openform("2")
Now even though the sub is called and code is executed, form2 does not
appear on top as needed. What is wrong and how can I make form2 appear from
within form1? Form1 & form2 are both child forms to the main form which
contains the sub OpenForm.
Thanks
Regards
I have this sub in a main form;
Sub OpenForm(ByVal x As String)
Select Case x
Case "1"
form1 = New frmClients
form1.TopLevel = False
Me.FormsPanel.Controls.Add(form1)
form1.Show()
form1.BringToFront()
Case "2"
form2 = New frmContacts
form2.TopLevel = False
Me.FormsPanel.Controls.Add(form2)
form2.Show()
form2.BringToFront()
End Select
End Sub
I first call the sub in the main form as OpenForm("1") which creates the
first child form1. Now in form1 I call the same sub as;
dim frm as new frmMain
frm.openform("2")
Now even though the sub is called and code is executed, form2 does not
appear on top as needed. What is wrong and how can I make form2 appear from
within form1? Form1 & form2 are both child forms to the main form which
contains the sub OpenForm.
Thanks
Regards