以文本方式查看主题

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

--  作者:jncoser
--  发布时间:2016/1/23 11:05:00
--  [求助]遍历控件
各位老师,我在窗口的afterL...中 加入


    For Each c As Winform.Control In e.Form.Controls
        If Typeof c Is WinForm.Button Then 
         Dim t As WinForm.Button = c
            t.Enabled = True
        Else
            c.Enabled = False         
        End If
    Next

所有控件 全都是不可以用,,,我错了哪了?

--  作者:Hyphen
--  发布时间:2016/1/23 11:17:00
--  
For Each c As Winform.Control In e.Form.Controls
    If Typeof c Is WinForm.Button Then
        c.Enabled = True
    End If
Next