set mdi child window to panel in window container

set mdi child window to panel in window container

Post by Cc » Fri, 08 Oct 2004 01:36:04

I try to make like note pad when open a document, the document will show in
a tab control (something in vs)
the trick I do is
- on window container(parent) I create a split container (one for tool
box ) another I put a tab control . (both set dock to fill)
- on mdi child(called newDoc) I set frame to none, window state to normal.
and put richtextbox in it(set dock to fill)
- back to window parent on menu (just said new document )

Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles NewToolStripMenuItem.Click
Dim o_newDoc As New newDoc

o_newDoc.MdiParent = Me

Dim TabPage1 As New System.Windows.Forms.TabPage



o_newDoc.Dock = DockStyle.Fill


End Sub

it work but there a problem :
1. no close button to close the tab panel & mdi window in it
2. how do I on runtime create tab panel

please any idea would be great