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

  • 相关阅读:
    如何学习一门新技术
    linux atoi
    linux switch 跳转到 ”跳转至 case 标号“ 的错误
    from unittest import TestCase
    ensure that both new and old access_token values are available within five minutes, so that third-party services are smoothly transitioned.
    .BigInteger
    408
    Convert a string into an ArrayBuffer
    Optimal asymmetric encryption padding 最优非对称加密填充(OAEP)
    https://tools.ietf.org/html/rfc8017
  • 原文地址:https://www.cnblogs.com/superjt/p/2458726.html
Copyright © 2011-2022 走看看