Realizar Calculadora En Vb .Net 2005

Páginas: 2 (407 palabras) Publicado: 14 de julio de 2011
Public CLass form1
Inherits System.Wndows.Forms.Form
Private borrar As Boolean = True
Private veces As Integer = 0
Private numero As Double
Private ecuacion As String
Private punto As Boolean =False

Private Sub Numericos(ByVal sender System.Object, ByVal e As System.EventArgs) Handles Button1.Clik, Button2.Click, Button3.Click, Button4.Click, Button5.Click, Button6.Click, Button7.Click,Button8.Click, Button9.Click, Button10.Click

'lblpantalla.Text &= CType(sender, TextBox).Text
If borrar = True Then
lblpantalla.Text = ""
borrar = False
End If
lblpantalla.Text &= sender.textEnd Sub

Private Sub pd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pd.Click
If borrar = True Then
lblpantalla.Text = ""
borrar = False
End If
If punto = FalseThen
lblpntalla.Text &= "."
punto = True
End If

End Sub

Private Sub Operacion(ByVal sender As System.Object, ByVal e As SystemArgs) Handles Suma.Click, Resta.Click, Division.Click, Igual.Clickveces += 1
If veces = 1 Then
numero = lblpantalla.Text
Else
Select Case acuacion
case "Suma"
numero += lblpantalla.Text
Case "Resta"
numero -= lblpantalla.Text
Case "Por"
numero *=lblpantalla.Text
Case "Divicion"
numero /= lblpantalla.Text
End Select
lblpantalla.Text = numero
End If
ecuacion = sender.name
borrar = True
punto = False
End Sub

Private Sub C_Click(ByVal senderAs System.Object, ByVal e As System.EventArgs) Handles C.Click
borrar = True
lblpntalla.Text = "0."
veces = 0
numero = 0
ecuacion = ""

End Sub

Private Sub CE_Click(ByVal sender AsSystem.Object, ByVal e As SystemEventArgs) Handles CE.Click
lblpantalla.Text = "0."
borrar = True
End Sub

Private Sub Button12_Click(ByVal sender As System.object, ByVal e As System.EventArgs)
SelectCase ecuacion
Case "Suma"
numero = numero + ((numero * lblpantalla.Text) / 100)
Case "Resta"
numero = numero - ((numero * lblpantalla.Text) / 100)
Case "Por"
numero = numero * ((numero *...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Visual Net.2005
  • calculo activo neto
  • vb net
  • Calculadora y caja de colores vb 8.0
  • valor residual y valor neto realizable
  • COMO SE REALIZARON LOS PRIMEROS CALCULOS
  • Conexiones vb. net con mysql, postgres, etc.
  • CALCULO DE UTILIDAD BRUTA, NETA Y OPERACIONAL

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS