private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { frmSettings formSetting = new frmSettings(reader, settings); formSetting.ShowDialog(); frmWelcome formWelcome = new frmWelcome(); formWelcome.Show(); formWelcome.message = "Loading user settings ..."; Application.DoEvents(); loadUserSettings(); formWelcome.message = String.Format("Setup reader settings ({0}) ...", reader.getURI()); Application.DoEvents(); if (reader.connect()) { if (setupReader() == true) { tsslStatus.Text = "Connected to reader"; } else { tsslStatus.Text = "Cannot connect to reader"; } } else { tsslStatus.Text = "Cannot connect to reader"; } formWelcome.Close(); }