Hi,
I think this might sound weird, but I’m working with new VS2005 Pro controls.
I have a SplitContainer and I would like to know if there is a way that allows me to show different forms (one at the time) inside my SplitContainer right panel.
My SplitContainer is on a MDI form and instead of showing the form above the SplitContainer, it would be nicer to have it inside the SplitContainer panel.
is it possible any hint
Thanks in advance
George

Show Forms inside a SplitContainer
english_d
George,
Try Panel1.Controls.Add(New frmClients)
Here's what I do:
' MFBaseForm is a common form others derive from for functionality to talk to the status bar, etc.
Dim f As MFBaseForm
f = New MFForm1 ' MFForm1 inherits from MFBaseForm
AddSubForm(f)
and so forth for each form
Private Sub AddSubForm(ByVal f As MFBaseForm) f.TopLevel = False f.FormBorderStyle = FormBorderStyle.None f.Dock = DockStyle.Fillf.statusBar =
Me.StatusBar1 Me.Panel1.Controls.Add(f) End SubYeshia
Hi Dalej,
Thanks for your answer, but I got an exception saying that a top level control cannot be added to a control, this is the code:
Private
Sub MainScreenX_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadPanel1.Controls.Add(frmClients)
End SubAny other idea
Thanks in advance
el-chema
Put a Panel control into the area where you want show the forms.
Add the forms to the Control collection in the panel.
Then Show()/Hide() the forms as they are required.