用 visual basic 整上網既 online 計時器

2006-10-15 4:27 am
用 visual basic 整上網既 online 計時器, 係 exe project, 聽人話好似用乜野 get online time 喎~ 唔係都唔緊要~ 請 vb 高人指教!

回答 (2)

2006-10-15 4:41 am
✔ 最佳答案
要看你乜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
2006-10-15 4:49 am
要看你乜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
參考: 網址


收錄日期: 2021-04-21 21:35:50
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20061014000051KK05254

檢視 Wayback Machine 備份