close
標題:
用 visual basic 整上網既 online 計時器
發問:
用 visual basic 整上網既 online 計時器, 係 exe project, 聽人話好似用乜野 get online time 喎~ 唔係都唔緊要~ 請 vb 高人指教!
最佳解答:
要看你乜Project,係EXE Project,畫一個Timer,為佢寫一堆Code! 如果係VBA Project應該用不到Timer (不是每一種Project都都), set timer為 (1000 as interval and enabled as false),用Now()作為現時時間, 可再加上Hour(),Mintues(), Second() Private Sub Form_Load() Timer1.Interval = 1000 End Sub (1)----------------- -------------------- ---- Private Sub Timer1_Timer() Label1.Caption = Now End Sub (2)----------------- -------------------- ---- Text1 = Format(Time, "hh:mm:ss AMPM") Function RetDateTime() As String Appdate = Date Apptime = Time nl = Chr$(10) + Chr$(13) RetDateTime = "Current Time : " & Apptime & nl & "Todays Date : " & Appdate End Function Private Sub Timer1_Timer() Label1.Caption = Format(Time, "hh:mm.ss&a mp;a mp;quot;) End Sub 參考資料: http://www.vbforums. com/showthread.php?t =70991
其他解答:
用 visual basic 整上網既 online 計時器
發問:
用 visual basic 整上網既 online 計時器, 係 exe project, 聽人話好似用乜野 get online time 喎~ 唔係都唔緊要~ 請 vb 高人指教!
最佳解答:
要看你乜Project,係EXE Project,畫一個Timer,為佢寫一堆Code! 如果係VBA Project應該用不到Timer (不是每一種Project都都), set timer為 (1000 as interval and enabled as false),用Now()作為現時時間, 可再加上Hour(),Mintues(), Second() Private Sub Form_Load() Timer1.Interval = 1000 End Sub (1)----------------- -------------------- ---- Private Sub Timer1_Timer() Label1.Caption = Now End Sub (2)----------------- -------------------- ---- Text1 = Format(Time, "hh:mm:ss AMPM") Function RetDateTime() As String Appdate = Date Apptime = Time nl = Chr$(10) + Chr$(13) RetDateTime = "Current Time : " & Apptime & nl & "Todays Date : " & Appdate End Function Private Sub Timer1_Timer() Label1.Caption = Format(Time, "hh:mm.ss&a mp;a mp;quot;) End Sub 參考資料: http://www.vbforums. com/showthread.php?t =70991
其他解答:
此文章來自奇摩知識+如有不便請留言告知
要看你乜Project,係EXE Project,畫一個Timer,為佢寫一堆Code! 如果係VBA Project應該用不到Timer (不是每一種Project都都), set timer為 (1000 as interval and enabled as false),用Now()作為現時時間, 可再加上Hour(),Mintues(), Second() Private Sub Form_Load() Timer1.Interval = 1000 End Sub (1)----------------- -------------------- ---- Private Sub Timer1_Timer() Label1.Caption = Now End Sub (2)----------------- -------------------- ---- Text1 = Format(Time, "hh:mm:ss AMPM") Function RetDateTime() As String Appdate = Date Apptime = Time nl = Chr$(10) + Chr$(13) RetDateTime = "Current Time : " & Apptime & nl & "Todays Date : " & Appdate End Function Private Sub Timer1_Timer() Label1.Caption = Format(Time, "hh:mm.ss&a mp;a mp;quot;) End Sub全站熱搜
留言列表