Ingreso De Informacion Windows Forms
LENGUAJE DE PROGRAMACION II
Por
ERIKA BIBIANA PINEDA ZAPATA
| |FACULTAD DEINFORMATICA |
| | |
||ASIGNATURA |
| |Lenguajesde programación II |
ESCUELA COLOMBIANA DE MERCADOTECNIA - ESCOLME
MEDELLIN
2012
ACTIVIDAD 1
Van a diseñar un aplicativo con WindowsForms que me permita que me permita ingresar dos números (ojo que ustedes deben de tratar de validar el segundo número ingresado, no debe de ser cero, ya que la división por cero no existe), haga lasrespectivas operaciones y muestren sus resultados.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
usingSystem.Text;
using System.Windows.Forms;
namespace Calculadora
{
public partial class MainForm : Form
{
int oper ; // 1 -> + | 2 -> - | 3 -> * | 4 -> /
float primero;
inttxtnum = 0;
int txtnum1 = 0;
public MainForm()
{
InitializeComponent();
}
void Numero7Click(object sender, EventArgs e)
{
txtnum = txtnum + 7;
}
voidNumero8Click(object sender, EventArgs e)
{
txtnum = txtnum + 8;
}
void Numero9Click(object sender, EventArgs e)
{
txtnum = txtnum + 9;
}
void Numero4Click(objectsender, EventArgs e)
{
txtnum = txtnum + 4;
}
void Numero5Click(object sender, EventArgs e)
{
txtnum = txtnum + 5;
}
void Numero6Click(object sender, EventArgs e)
{...
Regístrate para leer el documento completo.