private void MasterRecord_FormClosing(object sender, FormClosingEventArgs e) { try { mfs100.Dispose(); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Exception@FormClosing", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void Upastiti_FormClosing(object sender, FormClosingEventArgs e) { try { //Exit Thread readyForNext.Set(); exitThread = true; mssql.close(); if (mfs100 != null) { mfs100.Dispose(); } } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Exception@FormClosing", MessageBoxButtons.OK, MessageBoxIcon.Information); } }