以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]如何遍历所有的计划  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=34741)

--  作者:ifastudy
--  发布时间:2013/6/14 15:21:00
--  [求助]如何遍历所有的计划
想做一个按钮,停止所有的计划.结果系统提示,没有MyTimer .这个怎么如table,form不一样呢

For Each timer As MyTimer In MyTimers
timer.Enabled =false
Next

--  作者:Bin
--  发布时间:2013/6/14 15:27:00
--  
For Each ter As Timer In MyTimers.Values
ter.Enabled =False
Next

--  作者:狐狸爸爸
--  发布时间:2013/6/14 15:28:00
--  

这是一个字典,不是一个集合,遍历语法:

 

For Each tm As Timer In mytimers.values
    tm.enabled = False
Next

 

 


--  作者:ifastudy
--  发布时间:2013/6/14 15:30:00
--  
搞定,谢谢.