VB显示系统时间的代码是什么?

如题所述

VB显示系统时间的代码如下:

text1.text="今天是" & Format$(Now,"Long Date")
text2.text=Format$(Now,"dddd")
text3.text=Format$(Now,"Long Time")

Visual Basic是一种由 Microsoft 公司开发的结构化的、模块化的、面向对象的、包含协助开发环境的事件驱动为机制的可视化程序设计语言
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-05-31
text1.text="今天是" & Format$(Now,"Long Date")
text2.text=Format$(Now,"dddd")
text3.text=Format$(Now,"Long Time")
第2个回答  2011-03-23
用这两个API函数
Private Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)

Private Declare Function SetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME) As Long
第3个回答  2011-03-23
Private Sub Command1_Click()
Date = "2007/03/21"
Time = "02:12:01"
End Sub
第4个回答  2018-05-29

建议去查阅相关资料,毕竟在这里只能给你大致的讲一下,下面给出VB显示系统时间的代码:

text1.text="今天是" & Format$(Now,"Long Date") ;
text2.text=Format$(Now,"dddd") ;
text3.text=Format$(Now,"Long Time");

右击控件栏-部件-Microsoft Tabbed Dialong Control6.0。就能添加选项卡或者Microsoft Windows Common Control6.0(sp6),选择Tabstrip控件Webbrowser控件用数组解决。

Visual Basic是一种由 Microsoft 公司开发的结构化的、模块化的、面向对象的、包含协助开发环境的事件驱动为机制的可视化程序设计语言。

本回答被网友采纳
相似回答