思路:(仅供参考)
1、定义一个实例变量:Boolean ib_intterupt = False。
2、在一个按钮cb_1里面写代码,其text为“暂停”。
ib_intterupt = True
This.Text = "继续"
3、假设在cb_2按钮的循环里判断。
...
For i = 1 To 100
Yield()
If ib_intterupt = True Then
Exit
End If
...
End If
4、点击cb_1“继续”按钮,写代码:
ib_intterupt = False
This.Text = '暂停'
cb_2.TriggerEvent(Clicked!)