Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Command10_Click()
Dim Risultato As Double
Risultato = Sqr(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Sqr(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command11_Click()
Dim Risultato As Double
Risultato = Exp(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Exp(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command12_Click()
Dim Risultato As Double
Risultato = Log(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Log(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command13_Click()
Dim Risultato As Double
Risultato = Sin(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Sin(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command14_Click()
Dim Risultato As Double
Risultato = Cos(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Cos(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command15_Click()
Dim Risultato As Double
Risultato = Tan(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Tan(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command16_Click()
Dim Risultato As Double
Risultato = Atn(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Atn(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command17_Click()
Dim Risultato As Double
If Text1.Text = "" And Text2.Text = "" Then
MsgBox ("Inserire due numeri nelle rispettive finestre")
Else
If Text1.Text = "" Then
MsgBox ("Inserire un numero nella prima finestra")
Else
If Text2.Text = "" Then
MsgBox ("Inserire un numero nella seconda finestra")
Else
Risultato = CDbl(Text1.Text) Mod CDbl(Text2.Text)
Text1.Text = ""
Text2.Text = ""
Text1.Text = CStr(Risultato)
End If
End If
End If
End Sub
Private Sub Command18_Click()
Dim Risultato As Double
Risultato = Abs(Text1.Text)
Text1.Text = ""
Text1.Text = CStr(Risultato)
If Text2.Text = "" Then
Else
Risultato = Abs(Text2.Text)
Text2.Text = ""
Text2.Text = CStr(Risultato)
End If
End Sub
Private Sub Command19_Click()
If (Text1.Text Mod 2) = 0 Then
MsgBox ("Il numero nella prima finestra è pari")
Else
MsgBox ("Il numero nella prima finestra è dispari")
End If
If Text2.Text = "" Then
Else
If (Text2.Text Mod 2) = 0 Then
MsgBox ("Il numero nella seconda finestra è Pari")
Else
MsgBox ("Il numero nella seconda finestra è dispari")
End If
End If
End Sub
Private Sub Command2_Click()
Dim Risultato As Double
If Text1.Text = "" And Text2.Text = "" Then
MsgBox ("Inserire due numeri nelle rispettive finestre")
Else
If Text1.Text = "" Then
MsgBox ("Inserire un numero nella prima finestra")
Else
If Text2.Text = "" Then
MsgBox ("Inserire un numero nella seconda finestra")
Else
Risultato = CDbl(Text1.Text) + CDbl(Text2.Text)
Text1.Text = ""
Text2.Text = ""
Text1.Text = CStr(Risultato)
End If
End If
End If
End Sub
Private Sub Command20_Click()
If Text1.Text < Text2.Text Then
MsgBox ("Il numero nella prima finestra è Minore")
Else
MsgBox ("Il numero nella seconda finestra è Minore")
End If
End Sub
Private Sub Command21_Click()
About.Show 1
End Sub
Private Sub Command3_Click()
Dim Risultato As Double
If Text1.Text = "" And Text2.Text = "" Then
MsgBox ("Inserire due numeri nelle rispettive finestre")
Else
If Text1.Text = "" Then
MsgBox ("Inserire un numero nella prima finestra")
Else
If Text2.Text = "" Then
MsgBox ("Inserire un numero nella seconda finestra")
Else
Risultato = CDbl(Text1.Text) - CDbl(Text2.Text)
Text1.Text = ""
Text2.Text = ""
Text1.Text = CStr(Risultato)
End If
End If
End If
End Sub
Private Sub Command4_Click()
Dim Risultato As Double
If Text1.Text = "" And Text2.Text = "" Then
MsgBox ("Inserire due numeri nelle rispettive finestre")
Else
If Text1.Text = "" Then
MsgBox ("Inserire un numero nella prima finestra")
Else
If Text2.Text = "" Then
MsgBox ("Inserire un numero nella seconda finestra")
Else
Risultato = CDbl(Text1.Text) / CDbl(Text2.Text)
Text1.Text = ""
Text2.Text = ""
Text1.Text = CStr(Risultato)
End If
End If
End If
End Sub
Private Sub Command5_Click()
Dim Risultato As Double
If Text1.Text = "" And Text2.Text = "" Then
MsgBox ("Inserire due numeri nelle rispettive finestre")
Else
If Text1.Text = "" Then
MsgBox ("Inserire un numero nella prima finestra")
Else
If Text2.Text = "" Then
MsgBox ("Inserire un numero nella seconda finestra")
Else
Risultato = CDbl(Text1.Text) * CDbl(Text2.Text)
Text1.Text = ""
Text2.Text = ""
Text1.Text = CStr(Risultato)
End If
End If
End If
End Sub
Private Sub Command6_Click()
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = True
Command9.Enabled = True
Command14.Enabled = False
Command13.Enabled = False
Command12.Enabled = False
Command11.Enabled = False
Command10.Enabled = False
Command15.Enabled = False
Command16.Enabled = False
Command17.Enabled = False
Command18.Enabled = False
Command19.Enabled = True
Command20.Enabled = True
End Sub
Private Sub Command7_Click()
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = False
Command9.Enabled = True
Command14.Enabled = True
Command13.Enabled = True
Command12.Enabled = True
Command11.Enabled = True
Command10.Enabled = True
Command15.Enabled = True
Command16.Enabled = True
Command17.Enabled = True
Command18.Enabled = False
Command19.Enabled = False
Command20.Enabled = False
End Sub
Private Sub Command8_Click()
End
End Sub
Private Sub Command9_Click()
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = True
Command7.Enabled = True
Command9.Enabled = False
Command14.Enabled = False
Command13.Enabled = False
Command12.Enabled = False
Command11.Enabled = False
Command10.Enabled = False
Command15.Enabled = False
Command16.Enabled = False
Command17.Enabled = False
Command18.Enabled = True
Command19.Enabled = False
Command20.Enabled = False
End Sub
Private Sub Form_Load()
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = True
Command9.Enabled = True
Command14.Enabled = False
Command13.Enabled = False
Command12.Enabled = False
Command11.Enabled = False
Command10.Enabled = False
Command15.Enabled = False
Command16.Enabled = False
Command17.Enabled = False
Command18.Enabled = False
Command19.Enabled = True
Command20.Enabled = True
End Sub