Say I have two Forms FormA and FormB
In FormA I add an event handler for FormB's On_Closing event.
If I have code in FormB's On_Closing event in both FormA and FormB, does one get executed before the other? What happens??
Say I have two Forms FormA and FormB
In FormA I add an event handler for FormB's On_Closing event.
If I have code in FormB's On_Closing event in both FormA and FormB, does one get executed before the other? What happens??
How can you add an event for FormB's event from FormA? Is that even possible?
Code:for (int i;;) { cout << "Smith"; }
AFAIK, there is no order guaranteed for called event handlers. They're likely to be called in whatever order they're attached in - but it's probably not something you want to depend on.
If you wanted FormB's handler to run first, your better bet would be to override the Form.OnClosing function and perform your logic there instead of wiring the event.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks