jeudi 2 avril 2015

Events in WinForms between two unrelated forms

Ok, I am just ramping up on winforms after having used WPF for the last 3 years. I need to fire an event from one form (when the customer information is updated) and have another form subscribe to that event and perform some processing to update the the customer information that is displayed if the customer that was updated matches the customer in the other form. I've only been able to find examples of doing this on forms that are child/parent or from a user control to the parent form, where the parent form has a reference to the child form that is subscribing to the event. I can't find any information on how I would set this up on two forms that are not related and do not have references to each other. I just want to fire an event from one form and pick it up in another. Seems like it should be pretty easy but I'm not having much luck. Any help is appreciated! Thanks!


Aucun commentaire:

Enregistrer un commentaire