谢谢了~ 怎样用VB做一个计算器,最好有详细过程~~

来源:百度知道 编辑:UC知道 时间:2024/06/18 03:51:30
各个过程一定要清楚~
Thank YOU Foever~

Private Sub Command1_Click(Index As Integer)

Dim a, b

Select Case Index

Case 5

If Label2.Caption = "" Then

Label1.Caption = Label1.Caption & 1

ElseIf Label2.Caption <> "" And Label4.Caption = "" Then

Label3.Caption = Label3.Caption & 1

Else

MsgBox "请清零后再输入."

End If

Case 1

If Label2.Caption = "" Then

Label1.Caption = Label1.Caption & 2

ElseIf Label2.Caption <> "" And Label4.Caption = "" Then

Label3.Caption = Label3.Caption & 2

Else

MsgBox "请清零后再输入."

End If

Case 2

If Label2.Caption&n