how to add all windows form on the same panel in vb .net

i have a problem!
for eaxample i have three form3 form1, form2, formpanel. there is panel on the form formpanel.form1 is starting form.form1 opens on panel on the formpanel. there is button on form1, which opens form2.my problem is when i try to open form2 on panel of formpanel.previous formpanel window doesn't disappear even i use formpanel.hide().this form stil remains in background only with panel.
that is part to open form1 that is on button click on a simple page
Dim frm1 As New form1
Dim xx As New Formpanel
frm1.TopLevel = False
xx.Panel1.Controls.Add(frm1)
frm1.Parent = xx.Panel1
xx.Show()
frm1.Show()
Me.hide()


on form1 button click to open form 2
Dim frm1 As New form1
Dim xx As New Formpanel
frm1.TopLevel = False
xx.Panel1.Controls.Add(frm1)
frm1.Parent = xx.Panel1
xx.Show()
frm1.Show()
'Me.Hide()

plz help me i am trying this. hope u have understand the problem
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories