Share Pastebin
Guest
Private paste!

Untitled

By: a guest | Apr 26th, 2010 | Syntax: VB.NET | Size: 0.38 KB | Hits: 114 | Expires: Never
Copy text to clipboard
  1. Public Class Form1
  2.  
  3.     Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
  4.  
  5.         If MessageBox.Show("Are you sure you want to exit?", "Confirm exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.No Then
  6.             e.Cancel = True
  7.         End If
  8.  
  9.     End Sub
  10.  
  11. End Class