“小疙瘩小说网”最新网址:https://www.xgedda.com/,请您添加收藏以便访问
当前位置:小疙瘩小说网 > 其他综合 > 资料杂谈 > 资料杂谈 秒表倒计时程序
基于搜索引擎自动抓取技术,源网站:http://b.faloo.com/p/123267/8.html

资料杂谈 资料杂谈 秒表倒计时程序(1/4)

章节列表

Option Explicit
Private Const SRCCOPY = &HCC0020

Private Declare Function BitBlt Lib "gdi32" (ByVal hdcDest As Long, ByVal XDest As Long, ByVal YDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hDCSrc As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
   
Private WithEvents mobjSlumber As clsSlumber
Private mobjProgBar As clsProgressBar
Private mobjPieBar As clsPieBar

Private mdTotalTime As Double
Private mdCurrentTime As Double
Private mdCurrentHours As Long
Private mdCurrentMins As Long
Private mdCurrentSecs As Double
Private mbInterrupted As Boolean

Private Sub cmdStart_Click()
    On Error GoTo ErrHandler
    Dim sMsg As String
    
    If cmdStart.Caption = "Stop" Then
        mbInterrupted = True
        mobjSlumber.WakeUp
        Exit Sub
    End If
        
    'Ensure Data is Numeric
    txtHours.Text = Val(txtHours.Text)
    txtMins.Text = Val(txtMins.Text)
    txtSecs.Text = Val(txtSecs.Text)
    
    'Ensure Values are whole numbers
    txtHours.Text = Int(txtHours.Text)
    txtMins.Text = Int(txtMins.Text)
    txtSecs.Text = Int(txtSecs.Text)
       
    'Validate Input Data
    Select Case Val(txtHours.Text)
        Case Is < 0
            sMsg = "Hours cannot be a negative number!"
            GoTo DisplayMsg
    End Select
    
    Select Case Val(txtMins.Text)
        Case Is < 0
            sMsg = "Minutes cannot be a negative number!"
            GoTo DisplayMsg
        Case Is >= 60
            sMsg = "Minutes cannot be greater than or equal to 60!"
            GoTo DisplayMsg
    End Select
    
    Select Case Val(txtSecs.Text)
        Case Is < 0
            sMsg = "Seconds cannot be a negative number!"
            GoTo DisplayMsg
        Case Is >= 60
            sMsg = "Seconds cannot be greater than or eq -->>

章节列表