⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 123.frm

📁 一个很漂亮的日历
💻 FRM
📖 第 1 页 / 共 5 页
字号:
        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
   Case 12
        e = Str(Val(e) * Val(e))
        Ji_suan
   Case 13
        e = Str(Val(e) * Val(e) * Val(e))
        Ji_suan
   Case 14
        sum = 1
        For i = 1 To Val(e)
          sum = sum * i
        Next
        e = Str(sum)
        Ji_suan
   Case 16
        If op = "" Then
            e = Int(Val(e))
            txtDisp.Text = e
            f = ""
        Else
            f = Int(Val(f))
            txtDisp.Text = f
        End If
   
   Case 17
        If op = "" Then
           If Len(e) > 0 Then
            e = Mid(e, 1, Len(e) - 1)
            txtDisp.Text = e
            f = ""
           End If
        Else
          If Len(f) > 0 Then
            f = Mid(f, 1, Len(f) - 1)
            txtDisp.Text = f
          End If
        End If

   Case 22
        S_mem = S_mem + Val(txtDisp.Text)
        s_mem_B = False
   Case 23
        S_mem = S_mem - Val(txtDisp.Text)
        s_mem_B = False
  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()
     MPl.Play
         g = 1
        ShowNumFun Pt, wPw2(3), 1
        ShowNumARG Pt, wPw1(3), 20
    
     e = ""
     f = ""
     op = ""
    txtDisp.Text = "0"
End Sub
Private Sub cmdAC_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdAC
End Sub

Private Sub cmdAC_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdAC

End Sub

Private Sub cmdEq_Click()
     MPl.Play
    If op = "" Then
        e = Str(-(Val(e)))
        txtDisp.Text = e
    Else
        f = Str(-(Val(e)))
        txtDisp.Text = f
    End If
    chk = 1
End Sub
Private Sub cmdEq_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdEq
End Sub

Private Sub cmdEq_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdEq

End Sub

Private Sub cmdNum_Click(Index As Integer)
    On Error GoTo eh2
      MPl.Play
    If chk = 1 Then
        e = ""
        f = ""
        op = ""
        chk = 0
    End If
    If op = "" Then
        e = e & Trim(Str(Index))
        txtDisp.Text = e
    Else
        f = f & Trim(Str(Index))
        txtDisp.Text = f
    End If
    Exit Sub
eh2:
    txtDisp.Text = "-E-"
    e = ""
    f = ""
    op = ""
End Sub
Private Sub cmdOp_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdOp(Index)
End Sub

Private Sub cmdOp_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdOp(Index)

End Sub

Private Sub cmdOp_Click(Index As Integer)
    On Error GoTo eh3
       op_Sub
        txtDisp.Text = e
        op = ""
        chk = 0
    Select Case Index
        Case 0
            op = "+"
        Case 1
            op = "-"
        Case 2
            op = "*"
        Case 3
            op = "/"
        Case 4
            op = "^"
    End Select
    Exit Sub
eh3:
    txtDisp.Text = "-E-"
    e = ""
    f = ""
    op = ""
End Sub
Private Sub cmdPi_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdPi
End Sub

Private Sub cmdPi_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdPi

End Sub

Private Sub cmdPi_Click()
     MPl.Play
    If op = "" Then
        e = "3.141592654"
        txtDisp.Text = e
    Else
        f = "3.141592654"
        txtDisp.Text = f
    End If
End Sub
Private Sub cmdPM_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdPM
End Sub

Private Sub cmdPM_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdPM

End Sub

Private Sub cmdPM_Click()
    On Error GoTo eh1
    op_Sub
    txtDisp.Text = e
    op = ""
    chk = 1
    Exit Sub
eh1:
    txtDisp.Text = "-E-"
    e = ""
    f = ""
    op = ""

End Sub
Private Sub cmdPt_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P8, cmdPt
End Sub

Private Sub cmdPt_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   Show_b Picture5, P9, cmdPt

End Sub

Private Sub cmdPt_Click()
 MPl.Play
If op = "" Then
    e = e & "."
    txtDisp.Text = e
Else
    f = f & "."
    txtDisp.Text = f
End If
End Sub

Private Sub cmdT_Click()
    '显示查询面板
    If tiAo Then
        Timer4.Enabled = False
        Timer3.Enabled = True
    Else
        Timer4.Enabled = True
        Timer3.Enabled = False

    End If
     Label4.Enabled = False
     Picture4.Visible = True
     Picture5.Visible = False
End Sub


Private Sub Label4_Click()
   Pt.Visible = True
   cmdT.Enabled = False
   Picture5.Visible = True
   Picture4.Visible = False
    If jiSuan Then
        Timer6.Enabled = True
        Timer5.Enabled = False
        Timer1.Enabled = True
        Timer8.Enabled = False
    Else
        Timer6.Enabled = False
        Timer5.Enabled = True
        Timer8.Enabled = True
        Timer1.Enabled = False
    End If
   Picture5.SetFocus
End Sub
'单击返回今天
Private Sub C_clock_Click()
  Text1.Text = Year(Date)
  Text2.Text = Month(Date)
  Text3.Text = Day(Date)
    txt_Sub
    disPlay (Date)

End Sub

Private Sub Form_Activate()
    RunMain picScroll
End Sub

Private Sub Form_Load()
'===============================================
    Dim t As Single, rtn
    Form1.Height = 2715
    Form1.Width = 5400
     rtn = SetWindowPos(Form1.hwnd, -1, 0, 0, 0, 0, FLAGS)
     tip = 1
    t = Timer
    If Me.Picture <> 0 Then Call SetAutoRgn(Me)
    tiAo = False
    jiSuan = False
'-----------------------------------------------
    Picture4.Visible = False
    Picture5.Visible = False
'---------------------------------------
'计算器变量初始化
    s_mem_B = False
    S_mem = 0
    chk = 0
    e = ""
    f = ""
    op = ""
    txtDisp.Text = "0"
    g = 1
    ShowNumFun Pt, wPw2(3), 1
    ShowNumARG Pt, wPw1(3),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -