zoukankan      html  css  js  c++  java
  • 设置系统时间

    Declare Function SetLocalTime Lib "kernel32" (lpSystemTime As SystemTime) As Long

    Private Type SystemTime
            wYear As Integer
            wMonth As Integer
            wDayOfWeek As Integer
            wDay As Integer
            wHour As Integer
            wMinute As Integer
            wSecond As Integer
            wMilliseconds As Integer
    End Type

    Public Function SetTime(ByVal y As Integer, ByVal m As Integer, ByVal d As Integer, _
        ByVal h As Integer, ByVal n As Integer, ByVal s As Integer) As Boolean
       
        Dim lpSystemTime As SystemTime
       
        With lpSystemTime
            .wYear = y
            .wMonth = m
            .wDay = d
            .wHour = h
            .wMinute = n
            .wSecond = s
            .wMilliseconds = 0
        End With
       
        SetTime = CBool(SetLocalTime(lpSystemTime))
    End Function

  • 相关阅读:
    第五次作业
    第四次作业
    Java实验二
    java第一次作业
    第十一次作业
    第十次作业
    第九次作业
    第八次作业
    第七次作业
    第六次作业
  • 原文地址:https://www.cnblogs.com/lbnnbs/p/4784608.html
Copyright © 2011-2022 走看看