Ejemplo n.º 1
0
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);

            if (e.CloseReason == CloseReason.WindowsShutDown)
            {
                return;
            }

            // Confirm user wants to close
            switch (MessageBox.Show(this, "Are you sure you want to close?", "Closing", MessageBoxButtons.YesNo))
            {
            case DialogResult.No:
                e.Cancel = true;
                break;

            default:
                a.Stop();
                a = null;
                break;
            }
        }
Ejemplo n.º 2
0
 public frm()
 {
     InitializeComponent();
     a = new c69();
 }