set mdi child window to panel in window container

C

Cc

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

TabControl1.Controls.Add(TabPage1)

TabPage1.Controls.Add(o_newDoc)

o_newDoc.Dock = DockStyle.Fill

o_newDoc.Show()

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

rgds,
charles
 

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