this is my code so far -
Imports System.Windows.Forms
Public Class MDIParent1
Private m_ChildFormNumber As Integer
Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripMenuItem.Click, NewToolStripButton.Click, NewWindowToolStripMenuItem.Click
Dim ChildForm As New System.Windows.Forms.Form
ChildForm.MdiParent = Me
m_ChildFormNumber += 1
ChildForm.Text = "Note " & m_ChildFormNumber
ChildForm.Show()
Dim MdiRichTextBox As New RichTextBox()
With MdiRichTextBox
.Dock = DockStyle.Fill
.TabIndex = 0
End With
ChildForm.Controls.Add(MdiRichTextBox)
AddHandler CutToolStripMenuItem.Click, _
AddressOf MdiRichTextBox.Cut
AddHandler CopyToolStripMenuItem.Click, _
AddressOf MdiRichTextBox.Copy
AddHandler PasteToolStripMenuItem.Click, _
AddressOf MdiRichTextBox.Paste
AddHandler CutToolStripButton.Click, _
AddressOf MdiRichTextBox.Cut
AddHandler CopyToolStripButton.Click, _
AddressOf MdiRichTextBox.Copy
AddHandler PasteToolStripButton.Click, _
AddressOf MdiRichTextBox.Paste
End Sub
problem with it is that whatever you cut/copy/paste in one mdi container richtextbox, it automatically cuts/copies/pastes in the other richtextbox controls in the other containers..
p.s. sorry if i'm not being clear it's hard to explain.

New Topic/Question
Reply




MultiQuote




|