Visual basic

Solo disponible en BuenasTareas
  • Páginas : 3 (717 palabras )
  • Descarga(s) : 0
  • Publicado : 14 de marzo de 2011
Leer documento completo
Vista previa del texto
Dim n1 As Single
Dim n2 As Single
Dim s As Single
Dim r As Single
Dim m As Single
Dim d As Single

Private Sub cmd0_Click()
If txtcal.Text = "0" Then
txtcal.Text = 0
Elsetxtcal.Text = txtcal.Text & "0"
End If

End Sub

Private Sub cmd1_Click()
If txtcal.Text = "" Then

End If
If txtcal.Text = "0" Then
txtcal.Text = 1
Else
txtcal.Text = txtcal.Text& "1"
End If

End Sub

Private Sub cmd2_Click()
If txtcal.Text = "" Then
End If
If txtcal.Text = "0" Then
txtcal.Text = 2
Else
txtcal.Text = txtcal.Text & "2"
End IfEnd Sub

Private Sub cmd3_Click()
If txtcal.Text = "" Then
End If
If txtcal.Text = "0" Then
txtcal.Text = 3
Else
txtcal.Text = txtcal.Text & "3"
End If

End Sub

Private Subcmd4_Click()
If txtcal.Text = "" Then
End If
If txtcal.Text = "0" Then
txtcal.Text = 4
Else
txtcal.Text = txtcal.Text & "4"
End If

End Sub

Private Sub cmd5_Click()
Iftxtcal.Text = "" Then
End If
If txtcal.Text = "0" Then
txtcal.Text = 5
Else
txtcal.Text = txtcal.Text & "5"
End If

End Sub

Private Sub cmd6_Click()
If txtcal.Text = "" Then
EndIf
If txtcal.Text = "0" Then
txtcal.Text = 6
Else
txtcal.Text = txtcal.Text & "6"
End If

End Sub

Private Sub cmd7_Click()
If txtcal.Text = "" Then
End If
If txtcal.Text ="0" Then
txtcal.Text = 7
Else
txtcal.Text = txtcal.Text & "7"
End If

End Sub

Private Sub cmd8_Click()
If txtcal.Text = "" Then
End If
If txtcal.Text = "0" Then
txtcal.Text =8
Else
txtcal.Text = txtcal.Text & "8"
End If

End Sub

Private Sub cmd9_Click()
If txtcal.Text = "" Then
End If
If txtcal.Text = "0" Then
txtcal.Text = 9
Else
txtcal.Text= txtcal.Text & "9"
End If

End Sub

Lo primero de todo es crear 3 cajas de texto una para cada factor y otra para el resultado de las operaciones, y un botón para cada operación (sumar,...
tracking img