求大神帮忙看看下面的语句,timer5的tick间隔够大的,但是点button2后并没有出现button1点了100次的后果是怎么回事!!
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer5.Enabled = True
time = 1
End Sub
Private Sub Timer5_Tick(sender As Object, e As EventArgs) Handles Timer5.Tick
Call Button1_Click(sender, e)
time = time + 1
If time = 100 Then
Timer5.Enabled = False
End If
End Sub
vb.net问题 事件触发
答案:2 悬赏:20 手机版
解决时间 2021-03-01 19:51
- 提问者网友:蓝莓格格巫
- 2021-02-28 20:31
最佳答案
- 五星知识达人网友:往事隔山水
- 2021-02-28 21:24
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer5.Enabled = True
time = 1
End Sub
Private Sub Timer5_Tick(sender As Object, e As EventArgs) Handles Timer5.Tick
'Call Button1_Click(sender, e)
'time = time + 1
time = time + 1 '反过来
Call Button1_Click(sender, e) '反过来
If time = 100 Then
Timer5.Enabled = False
End If
End Sub
Timer5.Enabled = True
time = 1
End Sub
Private Sub Timer5_Tick(sender As Object, e As EventArgs) Handles Timer5.Tick
'Call Button1_Click(sender, e)
'time = time + 1
time = time + 1 '反过来
Call Button1_Click(sender, e) '反过来
If time = 100 Then
Timer5.Enabled = False
End If
End Sub
全部回答
- 1楼网友:冷風如刀
- 2021-02-28 21:33
我运行了一下,没问题啊,time到100才停下来,如果你那里有问题,那一定不在你已经贴出来的代码这里。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯