VB UTC+8校正 源码

小歆11年前软件源码03055
Function HttpGet(url)

    With CreateObject("Msxml2.ServerXMLHTTP")
        .open "GET", url, False
        .send
        HttpGet = .responseText
    End With

End Function

Private Sub cmd_Click()
    Dim aa As Date
        a = HttpGet("http://open.baidu.com/special/time/")
        a = Split(a, "window.baidu_time(")
        a = Split(a(1), ");")
        a = a(0)
        a = a / 1000
        aa = #1/1/1970#
        a = DateAdd("s", a, "1970-1-1 0:0:0")
        a = DateAdd("h", 8, a)
        lblLabel1.Caption = a
        lblLabel2.Caption = Now
        a = Split(a, " ")
        Date = a(0)
        Time = a(1)
    MsgBox "校正完毕", vbInformation, ""
End Sub

Private Sub Form_Load()
  a = HttpGet("http://open.baidu.com/special/time/")
        a = Split(a, "window.baidu_time(")
        a = Split(a(1), ");")
        a = a(0)
        a = a / 1000
        aa = #1/1/1970#
        a = DateAdd("s", a, "1970-1-1 0:0:0")
        a = DateAdd("h", 8, a)
        lblLabel1.Caption = a
        lblLabel2.Caption = Now
End Sub

相关文章

[小歆][LOL昵称查询QQ号工具][V1.0][2014.03.20]

[小歆][LOL昵称查询QQ号工具][V1.0][2014.03.20]

名称:LOL昵称查询QQ号工具V1.0 作者:小歆 说明:通过腾讯的游戏人生来获取的... 程序下载:LOL昵称查询QQ号工具V1.0(80...

VB获取网页源代码的五种方法

方法1:inet控件调用方法 Inet1.OpenURL     添加microsoft ineternet transfor conctrol6.0 控件   &n...

VB获取本机公网IP源码

Function HttpGet(url) With CreateObject("Msxml2.ServerXMLHTTP") .open "GET", url, Fa...

[VB函数]将资源文件输出到指定目录下

Private Function UnRes(ByVal ResID As Integer, ByVal ResName As String, ByVal UnResPath As String)...

小歆专用挂机锁V1.5测试1.jpg

[全新动态]小歆专用挂机锁项目开始启动!!!

小歆专用挂机锁V1.5升级项目 目前1.0版本项目已经结束,接下来是我们加强版1.5版本的升级日志,欢迎下载使用...    项目日志:...

VB键盘代码真值表

VB键盘代码常量 值 (0x...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。