![](https://cos-cdn.shuashuati.com/pipixue-web/2020-1231-2005-12/ti_inject-812ce.png)
模拟Windows计算器. 第四步:代码如下: Private Sub command9_Click() Dim c As String c = Trim(Text3.Text) Select Case c Case "+" Label2.Caption = Val(Text1.Text) + Val(Text2.Text) Case "-" Label2.Caption = Val(Text1.Text) - Val(Text2.Text) Case "*" Label2.Caption = Val(Text1.Text) * Val(Text2.Text) Case "/" Label2.Caption = Val(Text1.Text) / Val(Text2.Text) End Select End Sub