首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

VB text,该怎么解决

2012-01-26 
VB texttimer1_timer()col 0For i 0 To 300If Y(i) max1 Thenmax1 Y(i)col col + 1timecount(co

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

热点排行