满意答案
SHoW丶飞扬
2013.07.31
采纳率:57% 等级:9
已帮助:114人
由于本人级别不够,不能上传照片 图片在你的QQ邮箱里 运行界面,编程界面我发到你的邮箱里 Option Explicit Dim s_id As Integer Dim s As String Dim s1 As Double Function p(x As Double) As Boolean If InStr(x, ".") = 0 Then p = False Else p = True End If End Function Private Sub C_Click(Index As Integer) Select Case s_id Case 0, 2 Text1.Text = Text1.Text & Index Case
1 Text1.Text = Index s_id =
2 Case
3 Text1.Text = Index s_id = 0 End Select End Sub Private Sub CmdAdd_Click() Select Case s_id Case 0 s = "+" s1 = Text1.Text s_id = 1 Case 2 CmdDY_Click s = "+" s1 = Text1.Text s_id = 1 End Select End Sub Private Sub CmdBK_Click() If Len(Text1.Text) > 0 Then Text1.Text = Mid(Text1.Text, 1, Len(Text1.Text) - 1) End If End Sub Private Sub CmdC_Click() s_id = 0 Text1.Text = "" End Sub Private Sub CmdCF_Click() s_id =
1 s = "*" s1 = Text1.Text End Sub Private Sub CmdDY_Click() If s_id =
2 Then Select Case s Case "+" Text1.Text = s1 + Val(Text1.Text) s_id =
3 Case "-" Text1.Text = s1 - Val(Text1.Text) s_id = 3 Case "*" Text1.Text = s1 * Val(Text1.Text) s_id = 3 Case "/" Text1.Text = s1 / Val(Text1.Text) s_id = 3 End Select End If End Sub Private Sub CmdJF_Click() Select Case s_id Case 0 s = "-" s1 = Text1.Text s_id =
1 Case
2 CmdDY_Click s = "-" s1 = Text1.Text s_id = 1 End Select End Sub Private Sub CmdP_Click() If Not p(Text1.Text) Then Text1.Text = Text1.Text & "." End If End Sub Private Sub CmdSQRT_Click() Text1.Text = Sqr(Val(Text1.Text)) End Sub Private Sub CmdX1_Click() Text1.Text = 1 / Val(Te
00分享举报