模拟Windows计算器. 第三步:代码如下: Private Sub Command3_Click() Label3.Caption = Sin(Val(Text4.Text) * 3.1416 / 180) End Sub Private Sub Command4_Click() Label3.Caption = Sqr(Val(Text4.Text)) End Sub Private Sub Command5_Click() Label3.Caption = Oct(Val(Text4.Text)) End Sub Private Sub Command6_Click() Label3.Caption = Cos(Val(Text4.Text) * 3.1416 / 180) End Sub Private Sub Command7_Click() Label3.Caption = Log(Val(Text4.Text)) End Sub Private Sub Command8_Click() Label3.Caption = Hex(Val(Text4.Text)) End Sub