用vb编辑计算器需要哪些控件代码是哪些,操作步骤怎样?

来源:百度知道 编辑:UC知道 时间:2024/06/23 00:00:51
急,谢谢了

这是我做的,你可以看看。

   Dim op As String, op1 As Single, op2 As Single, nb As Integer, wer As Integer, first As Integer

Private Sub Command1_Click(Index As Integer)

If first = 1 Then

If Index = 10 Then

   Text1 = Val(Text1) * -1

   Else

   If Index = 11 Then

      Command1(Index).Enabled = False

   End If

   

   Text1 = Text1 & Command1(Index).Caption

   

   

      

End If

Else

Text1 = Command1(Index).Caption

first = 1

End If

<