精華區beta Visual_Basic 關於我們 聯絡資訊
※ 引述《UAREU (綠豆湯)》之銘言: : 請問各位先進 : 假如我要在text上面顯示秒數 : 但不是只有 0.1.2.3....一個數字而已 : 而是想要精準到小數點以下 : 該如何做呢? 百分之一秒... Private Sub Timer1_Timer() t = Timer h = Fix(t) \ 3600 m = Fix(t) \ 60 Mod 60 s = Fix(t) Mod 60 f = Round(t - Fix(t), 2) * 100 Caption = h & ":" & m & ":" & s & "." & f End Sub 20:48:59.99 -- 人若無星爺,跟條鹹魚有何分別? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.58.156.43
dieb:WindowsAPI的timeGetTime函數,時間可精確到1/1000秒 61.229.248.192 04/14
dieb:Private Declare Function timeGetTime Lib 61.229.248.192 04/14
dieb:"winmm.dll" Alias "timeGetTime" () As Long 61.229.248.192 04/14
fumizuki:Timer() 亦可 只是沒 API 函數來得精確而已 210.58.156.43 04/14