Create in ToolStrip and other form
I have 3 form :
* MDIForm (Main Menu)
* frmMemberList (To Display Member List)
* frmMember (To CRUD Member)
In MDIForm I have ToolStrip where there some buttons (add, modify, delete, preview and close)
I want to create an event where if you click the Add button he will call frmMember
Re: Create in ToolStrip and other form
Please, define, do you need a new instance of frmMember of the existing one (if any)?
For a new one:
vb Code:
Private Sub ButtonAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonAdd.Click
Dim f As New frmMember
f.Show()
End Sub
Re: Create in ToolStrip and other form
Without going down the interface root and to keep it simple, you check the type of the current selected child using Form.ActiveMDIChild. You can then call a method on that form by casting it first. Something like this:
Code:
If TypeOf Me.ActiveMdiChild Is frmMember Then
DirectCast(Me.ActiveMdiChild,frmMember).AddEntry
End If