private void button_OK_Click(object sender, EventArgs e) { if (!m_bAutoClose) { this.DialogResult = DialogResult.OK; this.Close(); } }