Está en la página 1de 5

using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace taller
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{
if (comboBox1.Text == "+")
{
FSUMA vena2 = new FSUMA();
vena2.Show();
this.Hide();
vena2.textresultado.Text = (Convert.ToInt32(txtb1.Text) +
Convert.ToInt32(txtb2.Text)).ToString();

} if (comboBox1.Text == "-")
{
FRESTA vena3 = new FRESTA();
vena3.Show();
this.Hide();
vena3.textresultado.Text = (Convert.ToInt32(txtb1.Text) -
Convert.ToInt32(txtb2.Text)).ToString();
}
if (comboBox1.Text == "*")
{
FMULTIPLICACION vena4 = new FMULTIPLICACION();
vena4.Show();
this.Hide();
vena4.textresultado.Text = (Convert.ToInt32(txtb1.Text) *
Convert.ToInt32(txtb2.Text)).ToString();

}
if (comboBox1.Text == "/")
{
FDIVICION vena5 = new FDIVICION();
vena5.Show();
this.Hide();
vena5.textresultado.Text = (Convert.ToInt32(txtb1.Text) /
Convert.ToInt32(txtb2.Text)).ToString();
}
}
}
}

También podría gustarte