private void Button1_Click(object sender, EventArgs e) { Calculator cal = new Calculator(); DialogResult res = MessageBox.Show("Hello", "My message", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (res == DialogResult.Yes) { Hide(); cal.Show(); } }
private void CalcBtn_Click(object sender, EventArgs e) { Calculator calculator = new Calculator(); calculator.Show(); }