private void Form1_FormClosing(object sender, FormClosingEventArgs e) { try { check.Dispose(true); // myThread.Abort(); } catch (Exception ex) { } }