The event is broadcast by the multi-cast delegate just like any other
event. This delegate has no knowledge of the Cancel property or what
it is for. It always sends the event to all subscribed delegates.
Also, there are situations where you have multiple listeners of the
closing event and you want them to all fire off even if one of them
says to cancel.
If what you're doing doesn't need to run if something else cancelled,
then it's good practice to add this check at top of routine.
HTH,
Sam
On Fri, 7 Jan 2005 11:43:26 -0500, " Just Me" <gr****@a-znet.com>
wrote:
I've seen this in example code:
Private Sub Studio_Closing(ByVal sender A..snip.. Handles MyBase.Closing
If e.Cancel Then Exit Sub
...snip...
It would make sense if Windows keeps doing Closing events even after it
receives an e.Cancel=true.
Is that the case?
Does the If make sense?
Can anyone shed some light on this?
Thanks for helpful comments