Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. static void Main() {
  2. Application.Run(new Form1());
  3. }
  4.  
  5. private static Form1 m_form;
  6.  
  7. static void Main() {
  8. try {
  9. m_form = new Form1();
  10. Application.Run(m_form);
  11. } catch (Exception err) {
  12. // log error
  13. if ((m_form != null) && !m_form.IsDisposed) {
  14. // you might want to save data on your form before it goes Bye-Bye.
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement