C validating canceleventargs
And, what should be Datasource Update Mode- On Property Changed or On Validation? ' Call this method from the Load method of your form. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Pete In consideration of the brief sample code at the following link... Cancel = true, How does the form subsequently know to NOT close the form?
That, plus I had some presumption - don't ask why - that the event handler delegates were invoking their referenced event handling methods asynchronously. That _would_ however make a difference in terms of the timing involved in the publisher giving any/all subscribers a chance to set the value of .
Cancel, with the subscriber needing block until any/all subscribers returned.
Private Sub Other Initialize() ' Exchange commented line and note the difference.
Data Saved = True ' Data Saved = False End Sub ' Other Initialize Private Sub Form1_Closing(sender As Object, e As _ System.