ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

C# Calculadora Modo Grafico


Enviado por   •  6 de Mayo de 2015  •  250 Palabras (1 Páginas)  •  338 Visitas

Mini-Calculadora en modo gráfico: (los nombres de los controles son faciles de deducir viendo el code :P)

Código

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Windows.Forms;

using System.Text;

namespace Calculadora

{

/// <summary>

/// Description of MainForm.

/// </summary>

public partial class MainForm : Form

{

int oper ; // 1 -> + | 2 -> - | 3 -> * | 4 -> /

float primero;

public MainForm()

{

InitializeComponent();

}

void Numero7Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 7;

}

void Numero8Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 8;

}

void Numero9Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 9;

}

void Numero4Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 4;

}

void Numero5Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 5;

}

void Numero6Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 6;

}

void Numero1Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 1;

}

void Numero2Click(object sender, EventArgs e)

{

txtnum.Text = txtnum.Text + 2;

}

void Numero3Click(object sender, EventArgs e)

{

txtnum.Text

...

Descargar como (para miembros actualizados)  txt (3 Kb)  
Leer 1 página más »
Disponible sólo en Clubensayos.com