Forms within one form

  • Thread starter Thread starter Loren Dummer
  • Start date Start date
L

Loren Dummer

I am trying to take a form and based on a selection from a list, it will
open a form and bind it to the main form so it looks like one form.

In VB6 you could do this using a few different 3rd Party controls, one was
the Sheridan/Infragistics splitter control. You could bind a form to a
specific pane of the splitter control.

Does anyone know of a way to do this using .NET.

Loren
 
* "Loren Dummer said:
I am trying to take a form and based on a selection from a list, it will
open a form and bind it to the main form so it looks like one form.

In VB6 you could do this using a few different 3rd Party controls, one was
the Sheridan/Infragistics splitter control. You could bind a form to a
specific pane of the splitter control.

I am not sure what you want to do, but does the .NET splitter control +
usercontrols fit your needs?
 
Not sure you want to use forms instead of usercontrols but if you want to,
create the form using panels and splitters (I have used the Sheridan
splitter control and it is much easier to use).

When you want to put a form into the mainform add the form to the panels
controls collection. You will have to set the TopLevel = False for the form
as well. I got this to work but it had many strange behaviours.

Lloyd Sheen
 
i am not sure whether its help u or not

Create two form
Form1 and form2. place a panel control in the form 2 and put a some control
inside the panel.
From the Form1 you can create a instance of the form2
and put a code like this
Panel objPanel = (Panel) Form2.controls(0)
Form1.controls.add(objPanel);


Regards
Jay
 
(I did post it yesterday but I don't see my post so I retry)

Create a form (that will become your hosted form) having the ControlBox
property set to False and the FormBorderStyle property set to None.

Now create another form (that will be the parent form) and add this code:
Dim x As New Form2()

x.TopLevel = False

Me.TabPage2.Controls.Add(x)

x.Left = 100

x.Show()


--

HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)



--

HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc.(www.s2i.com)
 
Back
Top