The Closing event is only fired when the user has initiated a close on the given Window. This window is about to close so this event will execute. You definitely should not be calling this.Close() again, which simply initiates another close, and another call to Window_Closing(), which calls this.Close().... infinite loop.
It's not clear from your post how you want the user to close the application. It it in response to a button click? To clicking the Close icon on a particular WinForm? What, exactly?
No comments:
Post a Comment