-------------------------按键的代码,这是正常的----------------Sub bk_CommandButton4_Click()
if bk_CommandButton4.Caption="运行中" then
iRun=0
\'暂停
bk_CommandButton4.Caption="暂停中"
bk_CommandButton4.backcolor=rgb(255,0,0)
else
iRun=1
\'运行
bk_CommandButton4.Caption="运行中"
bk_CommandButton4.backcolor=rgb(0,255,0)
end if
End Sub
----------------------------换成钩选的代码,不能正常------------
Sub bk_CheckBox1_Activate()
\'这个钩选的属性名字为CheckBox1
if bk_CheckBox1.Caption="运行中" then
\'
if bk_CommandButton4.Caption="运行中" then
iRun=0
\'暂停
bk_CheckBox1.Caption="暂停中"
else
iRun=1
\'运行
bk_CheckBox1.Caption="运行中"
end if
End Sub