以文本方式查看主题

-  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=7612)

--  作者:古奇
--  发布时间:2010/7/16 11:35:00
--  窗口按钮控件(已解决)

我想将一个窗口内的20多个按钮控件的 Enabled 都设成 False   一个个来写代码比较麻烦,可有简单点的代码吗??

 

 

抄了帮助里的:

    For Each c As WinForm.Control In Forms("工单").Controls
        If Typeof c Is WinForm.Button Then 
            Dim t As WinForm.Button = c 

            t.Enabled  = False
        End If
    Next

 

 

 

[此贴子已经被作者于2010-7-16 12:03:32编辑过]