Created
September 15, 2014 03:56
-
-
Save niwatpumkin/6530d238360d661c27d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protected Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click 'ปุ่มนะ | |
ClearTextBox(Me) 'เรียกใช้ฟังก์ชั่นข้างล่าง | |
End Sub | |
Public Sub ClearTextBox(ByVal root As Control) 'เอาฟังชั่นนี้ไปใส่ไว้ตรงไหนก็ได้ | |
For Each ctrl As Control In root.Controls | |
ClearTextBox(ctrl) | |
If TypeOf ctrl Is TextBox Then | |
CType(ctrl, TextBox).Text = String.Empty | |
End If | |
Next ctrl | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment