MDI Form

G

Guest

Hi,

I want to create an outlook-style form with a panel of buttons on the left
and the main information filling the rest of the screen. A different screen
appears for each button that is clicked. I've thought of using a tabcontrol
with the tabs hidden and using the buttons to navigate to the pages. But
that approach means tons of data handled on one form, and I'd rather separate
it. Is there any way to do this MDI-style and still keep the panel on the
left?
 
G

Guest

Thanks for that link, Ken. What I did was take a look at the code behind the
WPane, and wrote my own code to do what I want. Here's a simple solution for
anyone who wants to do the same thing:

Start with a blank form. Drag a panel (Panel1) onto it and set it's docking
to left. Then drag a stripbar to the form, then another panel (Panel2) with
the docking set to fill. Add a second form (Form2) to the application, and
put this somewhere in the code:

Dim frm As New Form2()
With frm
.Location = New Point(0, 0)
.TopLevel = False
.TopMost = False
.ControlBox = False
.FormBorderStyle = FormBorderStyle.None
.StartPosition = FormStartPosition.Manual
.Size = Panel2.ClientSize
.Parent = Panel2
.Visible = True
.Dock = DockStyle.Fill
.Focus()
End With

That's so simple it's freaky.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top