private void UserForm_FormClosing(object sender, FormClosingEventArgs e) { closing = true; if (mConnection != null) { mConnection.Dispose(); } } }