读书人

VB text,该怎么解决

发布时间: 2012-01-26 19:40:46 作者: rapoo

VB text
timer1_timer()
col = 0
For i = 0 To 300
If Y(i) > max1 Then
max1 = Y(i)
col = col + 1
timecount(col) = i
End If
Text1.text = timecount(col)
end sub


timer2_timer()
col = 0
For i = 0 To 300
If Y1(i) > max1 Then
max1 = Y1(i)
col = col + 1
timecount1(col) = i
End If
Text2.text = timecount1(col)
end sub
请问怎么求Text1.text 和Text2.text 的值到Text3.text ,即Text3.text = Abs(time(col) - time1(col))
我试过放在timer1或者timer2下都不行。请大家帮帮忙,急急急,最好附上源码


[解决办法]
Private Sub Timer1_Timer()
col = 0
For i = 0 To 300
If Y(i) > max1 Then
max1 = Y(i)
col = col + 1
timecount(col) = i
End If
text1.Text = timecount(col)

text3.Text = text1 - text2
End Sub


Private Sub Timer2_Timer()
col = 0
For i = 0 To 300
If Y1(i) > max1 Then
max1 = Y1(i)
col = col + 1
timecount1(col) = i
End If
text2.Text = timecount1(col)
End Sub

读书人网 >VB

热点推荐