zoukankan      html  css  js  c++  java
  • frmMain(frmMain.frm)窗体

    frmMain(frmMain.frm)窗体:有两个Timer控件

    Private Sub tmr790Blink_Timer()

    End Sub

    Private Sub tmrUpdateTime_Timer()

    Dim Elapsed As Long

    Dim nHours As Long, nMinutes As Long, nSeconds As Long

    Dim strH As String, strMin As String, strSec As String

    Dim strTimeStatus As String

    Dim MaxLen As Byte

    Info.ThisTime = GetTickCount

    Elapsed = (Info.ThisTime - Info.StartTime)

    nHours = Elapsed \ 3600000

    Elapsed = Elapsed - (nHours * 3600000)

    nMinutes = Elapsed \ 60000

    Elapsed = Elapsed - (nMinutes * 60000)

    nSeconds = Elapsed \ 1000

    strH = "": strMin = ""

    If nHours > 0 Then strH = Trim(Str(nHours)) & " h "

    If nMinutes > 0 Or nHours > 0 Then strMin = Trim(Str(nMinutes)) & " m "

    strSec = Trim(Str(nSeconds)) & " "

    strH = Space$((3 + 3) - Len(strH)) & strH

    strMin = Space$((2 + 3) - Len(strMin)) & strMin

    strSec = Space$((2 + 3) - Len(strSec)) & strSec

    strTimeStatus = strH & strMin & strSec

    MaxLen = (3 + 3) + (2 + 3) + (2 + 3)

    strTimeStatus = Space$(MaxLen - Len(strTimeStatus)) & strTimeStatus

    frmMain.Status.Panels(2).Text = strTimeStatus

    End Sub

     

     

     

    Private Sub tmrUpdateTime_Timer()

    Dim Elapsed As Long

    Dim nHours As Long, nMinutes As Long, nSeconds As Long

    Dim strH As String, strMin As String, strSec As String

    Dim strTimeStatus As String

    Dim MaxLen As Byte

    Info.ThisTime = GetTickCount

    Elapsed = (Info.ThisTime - Info.StartTime)

    nHours = Elapsed \ 3600000

    Elapsed = Elapsed - (nHours * 3600000)

    nMinutes = Elapsed \ 60000

    Elapsed = Elapsed - (nMinutes * 60000)

    nSeconds = Elapsed \ 1000

    strH = "": strMin = ""

    If nHours > 0 Then strH = Trim(Str(nHours)) & " h "

    If nMinutes > 0 Or nHours > 0 Then strMin = Trim(Str(nMinutes)) & " m "

    strSec = Trim(Str(nSeconds)) & " "

    strH = Space$((3 + 3) - Len(strH)) & strH

    strMin = Space$((2 + 3) - Len(strMin)) & strMin

    strSec = Space$((2 + 3) - Len(strSec)) & strSec

    strTimeStatus = strH & strMin & strSec

    MaxLen = (3 + 3) + (2 + 3) + (2 + 3)

    strTimeStatus = Space$(MaxLen - Len(strTimeStatus)) & strTimeStatus

    frmMain.Status.Panels(2).Text = strTimeStatus

    End Sub

  • 相关阅读:
    docker 安装 nexus3 初始密码不再是admin123
    eclipse中Tomcat修改项目名称
    WAMP3.1.3自定义根目录
    git学习笔记
    小米和MAC触摸板手势汇总
    IDEA快捷键汇总
    servelet 实现Post接口访问
    LeetCode:Jump Game II
    LeetCode:Trapping Rain Water
    LeetCode: Container With Most Water
  • 原文地址:https://www.cnblogs.com/superjt/p/2458726.html
Copyright © 2011-2022 走看看