private void frmSearch_FormClosing(object sender, FormClosingEventArgs e) { if (scanEngine != null) { scanEngine.Stop(); } }