vb农历公历转换系统设计 第3页

vb农历公历转换系统设计 第3页
    f = Str((Val(e) * 180 / Pi))
            txtDisp.Text = f
        End If
        chk = 1
        g = Pi / 180
     End If
        ShowNumARG Pt, wPw1(3), 19
   Case 1
     If g <> 1 Then
        If op = "" Then
            e = Str((Val(e) * Pi / 180))
            txtDisp.Text = e
        Else
            f = Str((Val(e) * Pi / 180))
            txtDisp.Text = f
        End If
        chk = 1
        g = 1
     End If
        ShowNumARG Pt, wPw1(3), 20
   Case 2
'        g = 1
        ShowNumARG Pt, wPw1(3), 21
   End Select
End Sub
Private Sub cmdOp_1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdOp_1(Index)
End Sub
Private Sub cmdOp_1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdOp_1(Index)
End Sub
'**************************************************
   '单一功能键按下、松开
Private Sub cmdops_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdOps(Index)
End Sub
Private Sub cmdops_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdOps(Index)
End Sub
'**************************************************
   '单一功能键按下、松开
Private Sub cmdOps_Click(Index As Integer)
 Dim sum As Double, i As Integer
On Error GoTo eh1
 MPl.Play
 Select Case Index
   Case 0
        e = Str(Sqr(Val(e)))
        ShowNumFun Pt, wPw1(3), 10
        Ji_suan
   Case 1
      If e <> 0 Then
        e = -Val(txtDisp)
      Else
        e = 0
      End If
        Ji_suan
   Case 2
        e = Str(Sin(Val(e) * g))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 3
        e = Str(Cos(Val(e) * g))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 4
        e = Str(Tan(Val(e) * g))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 5
        e = Str(Atn(Val(e)))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 6
        e = Str(1 / Sin(Val(e) * g))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 7
        e = Str(1 / Cos(Val(e) * g))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 8
        e = Str(Exp(Val(e)))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 9
        e = Str(Log(Val(e)))
        ShowNumFun Pt, wPw1(3), Index - 1
        Ji_suan
   Case 10
        Randomize
        If op = "" Then
          e = Str(9999999999# * Rnd)
            txtDisp.Text = e
          f = ""
        Else
          f = Str(99999999 * Rnd)
            txtDisp.Text = f
        End If
           ShowNumFun Pt, wPw1(3), Index - 1
   Case 11
        e = Str(1 / Val(e))
        Ji_suan
  *** 第11-23种情况略****
  Case 24
      If s_mem_B = False Then
            If op = "" Then
              e = Str(S_mem)
                txtDisp.Text = e
              f = ""
            Else
              f = Str(S_mem)
                txtDisp.Text = f
            End If
            s_mem_B = True
       Else
            S_mem = 0
            s_mem_B = False
       End If
 End Select
Exit Sub
eh1:
txtDisp.Text = "-E-"
e = ""
f = ""
op = ""
End Sub
Private Sub cmdAC_Click()

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有