Search Wiki:
Resource Page Description
This code sample shows how to let one form in a Windows Forms application know when data in another form got changed. To implement this behavior I’ll show you how to create an event on Form2 and how to subscribe to this event on Form1 using the Handles keyword. The C# source code uses delegates to implement the aforementioned behavior.


How Do I Video
The corresponding How-Do-I video can be found here.

Additional Resources
Handling and Raising Events
Events in Visual Basic

The examples were created using Visual Basic 2008 Express but do also apply to older versions of Visual Studio. Even though this concept is demonstrated in Windows Forms the same pattern can be used in WPF.


my blog
my code samples

P.S.: Please let me mw know if this code was helpful or not. If not, I’d appreciate if you could tell me what you were expecting. Thanks very much!
Last edited Sep 15 2009 at 4:37 AM  by Daniel_Walzenbach, version 8
Page view tracker