link del .exe: http://www.megaupload.com/?d=G5WU7VAJ
Código
Public Class Ventana Dim Valor1 As Double, Result As Double, Valor2 As Double, Marca_Suma As Boolean Dim Marca_Resta As Boolean, Marca_Multiplicacion As Boolean, Marca_Division As Boolean Private Sub Uno_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Uno.Click Valor1 = Valor1 * 10 + 1 Pantalla.Text = Valor1 End Sub Private Sub Dos_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Dos.Click Valor1 = Valor1 * 10 + 2 Pantalla.Text = Valor1 End Sub Private Sub Tres_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tres.Click Valor1 = Valor1 * 10 + 3 Pantalla.Text = Valor1 End Sub Private Sub Cuatro_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cuatro.Click Valor1 = Valor1 * 10 + 4 Pantalla.Text = Valor1 End Sub Private Sub Cinco_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cinco.Click Valor1 = Valor1 * 10 + 5 Pantalla.Text = Valor1 End Sub Private Sub Seis_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Seis.Click Valor1 = Valor1 * 10 + 6 Pantalla.Text = Valor1 End Sub Private Sub Siete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Siete.Click Valor1 = Valor1 * 10 + 7 Pantalla.Text = Valor1 End Sub Private Sub Ocho_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ocho.Click Valor1 = Valor1 * 10 + 8 Pantalla.Text = Valor1 End Sub Private Sub Nueve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nueve.Click Valor1 = Valor1 * 10 + 9 Pantalla.Text = Valor1 End Sub Private Sub Cero_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cero.Click Valor1 = Valor1 * 10 Pantalla.Text = Valor1 End Sub Private Sub Resta_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Resta.Click Pantalla.Text = "-" Valor2 = Valor1 Valor1 = 0 Marca_Resta = True End Sub Private Sub Suma_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Suma.Click Pantalla.Text = "+" Valor2 = Valor1 Valor1 = 0 Marca_Suma = True End Sub Private Sub Dividir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Dividir.Click Pantalla.Text = "/" Valor2 = Valor1 Valor1 = 0 Marca_Division = True End Sub Private Sub Multiplicar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Multiplicar.Click Pantalla.Text = "x" Valor2 = Valor1 Valor1 = 0 Marca_Multiplicacion = True End Sub Private Sub Resultado_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Resultado.Click If Marca_Suma = True Then Result = Valor2 + Valor1 ElseIf Marca_Resta = True Then Result = Valor2 - Valor1 ElseIf Marca_Multiplicacion = True Then Result = Valor2 * Valor1 ElseIf Marca_Division = True Then Result = Valor2 / Valor1 End If Pantalla.Text = Result End Sub Private Sub Limpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Limpiar.Click Pantalla.Text = "" : Valor1 = 0 : Valor2 = 0 Marca_Division = False : Marca_Multiplicacion = False : Marca_Resta = False : Marca_Suma = False End Sub End Class