随笔 - 49  文章 - 0 评论 - 19 
<2007年6月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Web Site Traffic Counter

常用链接

留言簿(3)

随笔分类(48)

随笔档案(49)

搜索

  •  

积分与排名

  • 积分 - 60949
  • 排名 - 99

最新评论

阅读排行榜

评论排行榜

'Clear All the TextBox
    Public Sub ClearTextBoxse()
        Dim mycontrol As Control
        Dim i As Integer
        For i = 0 To Controls.Count - 1
            mycontrol = Controls(i)
            If (TypeOf mycontrol Is TextBox) Then
                mycontrol.Text = ""
            End If
        Next
    End Sub
posted on 2007-06-19 17:15 疾风随影 阅读(738) 评论(2)  编辑 收藏 引用 所属分类: VB2005 column

FeedBack:
# re: 清除Form中所有TextBox的文本 2007-11-23 15:04 风中树木
'可以这样

Public Sub ClearTextBoxes()
For Each mycontrol as Control in Controls
If (TypeOf mycontrol Is TextBox) Then mycontrol.Text = ""
Next
End Sub   回复  更多评论
  
# re: 清除Form中所有TextBox的文本 2007-11-26 18:29 疾风随影
学习啦,代码简略了不少.  回复  更多评论
  
只有注册用户登录后才能发表评论。