Passing MDI Parents menu click events to child forms 
Author Message
 Passing MDI Parents menu click events to child forms
I have an MDI application with the menu on the parent form.  Does anyone
have any thoughts on the best way to execute methods or receive events from
the parent in the active child form based on which menu option was pressed?



Tue, 23 Nov 2004 22:16:10 GMT  
 Passing MDI Parents menu click events to child forms
Answering my own question here...

In the parent form:
Event DeleteClick()

Private Sub m{*filter*}lete_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles m{*filter*}lete.Click

' Raise the event.

RaiseEvent DeleteClick()

End Sub

In the child form:
Private WithEvents ParentForm1 As frmMain

Private Sub ParentForm1_DeleteClick() Handles ParentForm1.DeleteClick

DeleteLoan()

End Sub

If there is a better way to do this, then someone please let me
know...thanks.


Quote:
> I have an MDI application with the menu on the parent form.  Does anyone
> have any thoughts on the best way to execute methods or receive events
from
> the parent in the active child form based on which menu option was
pressed?



Tue, 23 Nov 2004 22:48:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Parent & Child Menu Click Events

2. Modifying object in MDI Parent form from MDI Child form

3. Accessing Objects on a Mdi Parent form from a Mdi Child form

4. Calling MDI child code from MDI parent menu???

5. ????Capturing MDI Child events in Parent Form

6. ????Capturing MDI Child events in Parent Form

7. ????Capturing MDI Child events in Parent Form

8. Maximized MDI child form Covering Status bar on MDI parent

9. set the MDI parent of MDI child forms that are in a DLL

10. Help: Change a MDI child's parent MDI form at run-time

11. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

12. Loading MDI Child forms to a parent form from a DLL

 

 
Powered by phpBB® Forum Software