以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  【求助】清除所有控件时的清除按钮出错  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=118615)

--  作者:wangjx817
--  发布时间:2018/5/7 14:55:00
--  【求助】清除所有控件时的清除按钮出错
For Each c As WinForm.Control In e.Form.Controls
        If Typeof c Is winform.TextBox OrElse TypeOf c Is winform.Combobox OrElse TypeOf c Is winform.DropDownBox Then
            Dim t As WinForm.TextBox = c
            Dim t1 As WinForm.Combobox = c
            Dim t2 As WinForm.DropDownBox = c
            t.Value = Nothing
            t1.Value = Nothing
            t2.Value = Nothing
        End If
    Next


--  作者:wangjx817
--  发布时间:2018/5/7 14:57:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20180507143819.png
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2018/5/7 15:03:00
--  
For Each c As WinForm.Control In e.Form.Controls
    If Typeof c Is winform.TextBox OrElse TypeOf c Is winform.Combobox OrElse TypeOf c Is winform.DropDownBox Then
        c.Value = Nothing
    End If
Next