If you mean the Form1_FormClosed eventhandler (there's no Unload event in .NET), then there's no need to put any code in there because if someone closes the start up form (normally Form1) it will automatically close all the other forms as well and terminate the application.
1 answers
If you want to close all forms and quit the application immediately, I'd just call Application.Exit().
To press a button programatically you can use button1.PerformClick().
answered 2 years ago by:
17279
153
thank you it's work good but how i can but it in Form1_UnLoad
17279
If you mean the Form1_FormClosed eventhandler (there's no Unload event in .NET), then there's no need to put any code in there because if someone closes the start up form (normally Form1) it will automatically close all the other forms as well and terminate the application.