Private Sub Command1_Click()
a = Val(Text1.Text)
If Label1.Caption = "倒数" Then
Text3.Text = 1 / a
End If
If Label1.Caption = "开平方" Then
If a < 0 Then
MsgBox ("请输入正整数")
Else
Text3.Text = Sqr(a)
End If
End If
If Label1.Caption = "平方" Then
Text3.Text = a ^ 2
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Label1.Caption = "?"
Text3.Text = ""
End Sub
Private Sub Command3_Click()
End
End Sub
a = Val(Text1.Text)
If Label1.Caption = "倒数" Then
Text3.Text = 1 / a
End If
If Label1.Caption = "开平方" Then
If a < 0 Then
MsgBox ("请输入正整数")
Else
Text3.Text = Sqr(a)
End If
End If
If Label1.Caption = "平方" Then
Text3.Text = a ^ 2
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Label1.Caption = "?"
Text3.Text = ""
End Sub
Private Sub Command3_Click()
End
End Sub