Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. private void Defeat()
  2. {
  3. MessageBox.Show("Goodbye");
  4. this.Close();
  5. }
  6.  
  7. An unhandled exception of type 'System.Runtime.InteropServices.ExternalException' occurred in System.Drawing.dll
  8.  
  9. Additional information: A generic error occurred in GDI+.
  10.  
  11. private void Defeat()
  12. {
  13. MessageBox.Show("Goodbye");
  14. Application.Exit();
  15. }
  16.  
  17. DialogResult dig = new DialogResult();
  18. dig = MessageBox.Show("Do you want to Clos"Alert!",MessageBoxButtons.YesNo);
  19. if (dig == DialogResult.Yes){
  20. System.Environment.Exit(1);}
  21.  
  22. private void btnExit_Click(object sender, EventArgs e)
  23. {
  24. this.Close(); //”this” refers to the form
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement