注册 登录
编程论坛 VB6论坛

【求助】vb时间问题

chiwei2013 发布于 2013-10-03 18:20, 473 次点击
程序代码:
Private Sub recTimer_Timer()
On Error GoTo myErr
Dim temp As Double
temp = 0.02
If (intReceiveLen > 0 And recLen = intReceiveLen) Then
    Dim revalue As Integer
    revalue = treateRecdata
    If (revalue = 1) Then
   
            With grdRunData
            For ii = 0 To 8
    .ColAlignment(ii) = 4
    Next ii
                lblRecDT.Caption = DTPicker1.Value
                For i = 0 To UBound(R_Data)
                    If "" <> R_Data(i) Then
                        .Rows = i + 2
                        .TextMatrix(i + 1, 5) = R_Data(i)
                        .TextMatrix(i + 1, 4) = DateAdd("s", 900, DTPicker1.Value)   这是第一行第四列的时间
                        .TextMatrix(i + 1, 3) = DTPicker1                             这是第一行第三列的时间
                        .TextMatrix(i + 1, 0) = i + 1
                        If (i + 1) Mod 2 = 0 Then
                        .TextMatrix(i + 1, 1) = Format(temp, "0.00")
                         If (i + 1) Mod 6 = 0 Then
                          temp = temp + 0.02
                        
                         End If
                     
                        End If
                    End If
                Next i
请问如何依次将每行的时间加5秒    ,,,万分感谢
1 回复
#2
lanyingjie2014-03-08 11:50
你可以再建立一个Timer过程
运行完Timer之后,再继续
1