4de游乐场吧 关注:80贴子:2,317
  • 2回复贴,共1
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


IP属地:北京1楼2009-06-03 13:52回复
    Private Sub Command4_Click()
    Label1.Caption = "倒数"
    End Sub
    Private Sub Command5_Click()
    Label1.Caption = "开平方"
    End Sub
    Private Sub Command6_Click()
    Label1.Caption = "平方"
    End Sub
    Private Sub Form_Load()
    End Sub


    IP属地:北京2楼2009-06-03 13:53
    回复
      计算器


      IP属地:北京3楼2009-06-03 13:53
      回复