vb中设计在标题中显示当前日期

来源:百度知道 编辑:UC知道 时间:2024/05/27 17:18:31
要求:
年.月.日.小时.分.秒

Me.Caption = time 是显示小时分秒
Me.Caption = now 是现在具体时间
Me.Caption = date 日期

需要timer控件一个interval=1000
复制下面代码:

Option Explicit

Private Sub Timer1_Timer()
Me.Caption = Now
End Sub

代码如下。
========
Private Sub Form_Load()
Caption = Now
End Sub

form1.caption=time()