乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      VB6.0的倒計時代碼(可隨意輸入小時,分鐘,秒數(shù)的)格式為:()時()分()秒

       hdzgx 2019-10-10

      平常用用的倒計時代碼,時間小于9小時的。

      Option Explicit

      Private Sub Command1_Click()

        If Command1.Caption = "開始倒計時" Then

         On Error Resume Next

           If Val(Text1.Text) > 9 Then MsgBox "小時數(shù)設(shè)置過大,請重設(shè)": Exit Sub

          If Val(Text2.Text) > 60 Then MsgBox "分鐘設(shè)置有誤,請檢查": Exit Sub

          If Val(Text3.Text) > 60 Then MsgBox "秒設(shè)置有誤,請檢查": Exit Sub

          Command1.Caption = "暫停"

          Timer1.Enabled = True

          Text1.Enabled = False

          Text2.Enabled = False

          Text3.Enabled = False

        Else

          Command1.Caption = "開始倒計時"

          Timer1.Enabled = False

          

          Text1.Enabled = True

          Text2.Enabled = True

          Text3.Enabled = True

        End If

      End Sub

      Private Sub form_load()

        Command1.Caption = "開始倒計時"

        Timer1.Interval = 1000

        Timer1.Enabled = False

        Text2.MaxLength = 2

        Text3.MaxLength = 2

        Text1.Text = 0

        Text2.Text = 0

        Text3.Text = 0

      End Sub

      Private Sub Text1_KeyPress(KeyAscii As Integer)

        If KeyAscii > Asc(9) Or KeyAscii < Asc(0) Then MsgBox "請輸入整數(shù)": KeyAscii = 0

      End Sub

      Private Sub Text2_KeyPress(KeyAscii As Integer)

        If KeyAscii > Asc(9) Or KeyAscii < Asc(0) Then MsgBox "請輸入整數(shù)": KeyAscii = 0

      End Sub

      Private Sub Text3_KeyPress(KeyAscii As Integer)

        If KeyAscii > Asc(9) Or KeyAscii < Asc(0) Then MsgBox "請輸入整數(shù)": KeyAscii = 0

      End Sub

      Private Sub Timer1_Timer()

        Dim h As Integer, m As Integer, s As Integer, total As Double

        h = Val(Text1.Text)

        m = Val(Text2.Text)

        s = Val(Text3.Text)

        total = h * 3600 + m * 60 + s

        total = total - 1

        h = total \ 3600

        m = (total Mod 3600) \ 60

        s = total - h * 3600 - m * 60

        Text1.Text = h

        Text2.Text = m

        Text3.Text = s

        If total = 0 Then MsgBox "時間到!": Timer1.Enabled = False

        End Sub

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多