For Each c As WinForm.Control In e.Form.Controls
Select Case
TypeOf c Case WinForm.TextBox
Dim t As WinForm.TextBox = c '使用特定类型的变量引用控件
t.Value = Nothing
End Select
‘’‘ If TypeOf c Is WinForm.TextBox Then '判断控件是否是文本框
’‘’‘ Dim t As WinForm.TextBox = c '使用特定类型的变量引用控件
’‘’‘ t.Value = Nothing
’‘’‘ End If
Next
控件比较多,有没有用select case 来编写历遍控件和判断控件类型的方法?