VB !!! 聽日exam !!! for n = 乜乜乜step 乜乜乜 next , timer, 20分架 !!

2007-01-11 1:38 am
for...next點用 ??
timer點用
比d code黎
thz

回答 (2)

2007-01-11 1:48 am
✔ 最佳答案
=.= 唔係for乜乜..人地有名叫for loop
for 同 next 既statement好簡單..
A For Next statement loops a specified number of times. The syntax of a For Next loop is:

For Counter = Value To Limit [Step]
Statement[s]
[Exit For]
Next

即係
intTotal = 0
For i = 1 To 100
intTotal = inTotal + i
Next
Print "The Total is ="; intTotalLoop


之後Timer Control係用黎set時間 Data Function
Private Sub Timer1_Timer90
IF lblClock.Caption <> CStr(Time) Then
lblClock.Caption = Time
End If
參考: 自己
2007-01-11 1:55 am
=.= 唔係for乜乜..人地有名叫for loop
for 同 next 既statement好簡單..
A For Next statement loops a specified number of times. The syntax of a For Next loop is:

For Counter = Value To Limit [Step]
Statement[s]
[Exit For]
Next

即係
intTotal = 0
For i = 1 To 100
intTotal = inTotal + i
Next
Print "The Total is ="; intTotalLoop


之後Timer Control係用黎set時間 Data Function
Private Sub Timer1_Timer90
IF lblClock.Caption <> CStr(Time) Then
lblClock.Caption = Time
End If
希望你參考我的意見啦!Thank you!
參考: me


收錄日期: 2021-04-13 15:55:53
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070110000051KK02657

檢視 Wayback Machine 備份