private void button2_Click(object sender, EventArgs e) { string message = "Você deseja verificar o movimento?"; string caption = "Recanto Sertanejo"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // Displays the MessageBox. result = MessageBox.Show(this, message, caption, buttons, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (result == DialogResult.Yes) { iRetorno = WindowsFormsApplication1.MP2032.FechaPorta(); WindowsFormsApplication1.movimento mov = new movimento(); mov.Show(); this.Visible = false; // Closes the parent form. //Application.Exit(); } else { Application.Exit(); } }
private void button5_Click(object sender, EventArgs e) { WindowsFormsApplication1.movimento mov = new movimento(); mov.Show(); this.Visible = false; }