Hello,
I currently have a MDI application form mdiMain that contains a toolbar. I have a Child form frmChild. On the toolbar there are 2 fixed buttons. When the child window is shown, I add 3 buttons to the toolbar (IE. Copy,Cut, Paste). How can I since these buttons are added to the child form how can I pass the ToolBar1_ButtonClick from the MDI form since each child window will have its own buttons?
Here is the code so far:
Private Sub frmChild_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim frm As mdiMain = Me.ParentForm
Dim copy As New ToolBarButton
frm.ToolBar1.Buttons.Add(copy)
copy.ImageIndex = 12
copy.Tag = "Copy"
Dim cut As New ToolBarButton
frm.ToolBar1.Buttons.Add(cut)
cut.ImageIndex = 11
Dim paste As New ToolBarButton
frm.ToolBar1.Buttons.Add(paste)
paste.ImageIndex = 6
End Sub
Thanks in advance?