代码放到窗口的TimerTick事件,同时启用计时器,间隔1000,用Lable控件,比如这样:
Dim lbl As WinForm.Label = e.Form.Controls("当前时间")lbl.Text = "当前用户:" & User.Name & " 日期:" & format (Date.Today,"yyyy年MM月dd日" )& " " & Format (Date.Today, "dddd")& " 时间:" & Format (Date.now, "HH:mm:ss")