You are on page 1of 7

Dim OP As String

Dim a, b, resultado As Double


Dim c As Double
Private Sub Command1_Click()
Command1.Visible = False
Command2.Visible = True
Command23.Visible = True
Command4.Visible = True
Command5.Visible = True
Command6.Visible = True
Command7.Visible = True
Command8.Visible = True
Command9.Visible = True
Command10.Visible = True
Command11.Visible = True
Command12.Visible = True
Command13.Visible = True
Command14.Visible = True
Command15.Visible = True
Command16.Visible = True
Command17.Visible = True
Command18.Visible = True
Command19.Visible = True
Command20.Visible = True
Command22.Visible = True
Command26.Visible = True
Command24.Visible = True
Command25.Visible = True
Command28.Visible = True
Command29.Visible = True
Command30.Visible = True
Command33.Visible = True
Command31.Visible = True
Command32.Visible = True
Command27.Visible = True
Command34.Visible = True
Text1.Visible = True
End Sub
Private Sub Command10_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "6"
c = False
End Sub
Private Sub Command11_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "7"
c = False
End Sub
Private Sub Command12_Click()
If c = True Then
Text1.Text = ""
End If

Text1.Text = Text1.Text + "8"


c = False
End Sub
Private Sub Command13_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "9"
c = False
End Sub
Private Sub Command14_Click()
Text1.Text = Text1.Text + "."
End Sub
Private Sub Command15_Click()
b = Val(Text1.Text)
Select Case OP
Case "SUMA"
resultado = a + b
Text1.Text = resultado
Case "RESTA"
resultado = a - b
Text1.Text = resultado
Case "MULTIPLICACION"
resultado = a * b
Text1.Text = resultado
Case "DIVISION"
resultado = a / b
Text1.Text = resultado
Case "POTENCIA"
resultado = a ^ b
Text1.Text = resultado
Case "RAIZ CUADRADA"
resultado = a / 2
Text1.Text = resultado
Case "POTENCIA2"
resultado = a ^ 2
Text1.Text = resultado
Case "POTENCIA3"
resultado = a ^ 3
Text1.Text = resultado
Case "1/x"
resultado = 1 / a
Text1.Text = resultado
Case "X/X"
resultado = a / 2
Text1.Text = resultado
Case "TANTO X CIENTO"
resultado = a / 100
Text1.Text = resultado
Case "X/x^3"
resultado = (a / (b ^ 2))
Text1.Text = resultado
Case "SENO"
resultado = a / 15500000
Text1.Text = resultado
Case "IVA"
resultado = a * 0.12

Text1.Text = resultado
Case "COSENO"
resultado = a / 155000005
Text1.Text = resultado
End Select
End Sub
Private Sub Command16_Click()
a = Text1.Text
Text1.Text = ""
OP = "SUMA"
End Sub
Private Sub Command17_Click()
a = Text1.Text
Text1.Text = ""
OP = "RESTA"
End Sub
Private Sub Command18_Click()
a = Text1.Text
Text1.Text = ""
OP = "MULTIPLICACION"
End Sub
Private Sub Command19_Click()
a = Text1.Text
Text1.Text = ""
OP = "DIVISION"
End Sub
Private Sub Command2_Click()
Command1.Visible = True
Command2.Visible = False
Command23.Visible = False
Command4.Visible = False
Command5.Visible = False
Command6.Visible = False
Command7.Visible = False
Command8.Visible = False
Command9.Visible = False
Command10.Visible = False
Command11.Visible = False
Command12.Visible = False
Command13.Visible = False
Command14.Visible = False
Command15.Visible = False
Command16.Visible = False
Command17.Visible = False
Command18.Visible = False
Command19.Visible = False
Command20.Visible = False
Command22.Visible = False
Command26.Visible = False
Command24.Visible = False
Command25.Visible = False
Command28.Visible = False
Command29.Visible = False
Command30.Visible = False
Command33.Visible = False

Command34.Visible = False
Command31.Visible = False
Command32.Visible = False
Command27.Visible = False
Text1.Visible = False
End Sub
Private Sub Command20_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "3.14"
c = False
End Sub
Private Sub Command21_Click()
End
End Sub
Private Sub Command22_Click()
a = Text1.Text
Text1.Text = ""
OP = "SENO"
End Sub
Private Sub Command23_Click()
a = Text1.Text
Text1.Text = ""
OP = "COSENO"
End Sub
Private Sub Command24_Click()
a = Text1.Text
Text1.Text = ""
OP = "X/X"
End Sub
Private Sub Command25_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + ")"
c = False
End Sub
Private Sub Command26_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "("
c = False
End Sub
Private Sub Command27_Click()
a = Text1.Text
Text1.Text = ""
OP = "TANTO X CIENTO"
End Sub

Private Sub Command28_Click()


a = Text1.Text
Text1.Text = ""
OP = "POTENCIA"
End Sub
Private Sub Command29_Click()
a = Text1.Text
Text1.Text = ""
OP = "POTENCIA2"
End Sub
Private Sub Command3_Click()
Text1.Text = " "
End Sub

Private Sub Command30_Click()


a = Text1.Text
Text1.Text = ""
OP = "POTENCIA3"
End Sub
Private Sub Command31_Click()
a = Text1.Text
Text1.Text = ""
OP = "X/x^3"
End Sub
Private Sub Command32_Click()
a = Text1.Text
Text1.Text = ""
OP = "IVA"
End Sub
Private Sub Command33_Click()
a = Text1.Text
Text1.Text = ""
OP = "1/x"
End Sub
Private Sub Command34_Click()
a = Text1.Text
Text1.Text = ""
OP = "RAIZ CUADRADA"
End Sub
Private Sub Command4_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "0"
c = False
End Sub
Private Sub Command5_Click()
If c = True Then
Text1.Text = ""

End If
Text1.Text = Text1.Text + "1"
c = False
End Sub
Private Sub Command6_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "2"
c = False
End Sub
Private Sub Command7_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "3"
c = False
End Sub
Private Sub Command8_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "4"
c = False
End Sub
Private Sub Command9_Click()
If c = True Then
Text1.Text = ""
End If
Text1.Text = Text1.Text + "5"
c = False
End Sub

Private Sub mapisshus200_Click(Index As Integer)


Form3.Show
End Sub
Private Sub mdivi_Click(Index As Integer)
a = Text1.Text
Text1.Text = ""
OP = "DIVISION"
End Sub
Private Sub mfapissh_Click()
Form2.Show
End Sub
Private Sub mmulti_Click(Index As Integer)
a = Text1.Text
Text1.Text = ""
OP = "MULTIPLICACION"
End Sub
Private Sub mres_Click(Index As Integer)

a = Text1.Text
Text1.Text = ""
OP = "RESTA"
End Sub
Private Sub msum_Click(Index As Integer)
End
End Sub
Private Sub msuma_Click(Index As Integer)
a = Text1.Text
Text1.Text = ""
OP = "SUMA"
End Sub

You might also like