clearing/resetting values

r4k35h

Member
Joined
Sep 4, 2006
Messages
20
Programming Experience
Beginner
Hi to everyone who view this Post

I would like to know if it is possible to write a code such that by pressing a button I would be able to clear /reset the values of controls such as textbox,checkbox,combobox etc. if so please provide the code

note: if a similar question is already put up please notify it to me
 
You can approach it like this. However, resetText() seems to clear the textbox completely.

VB.NET:
Expand Collapse Copy
        For Each ctrl As Control In Me.Controls
            If TypeOf (ctrl) Is TextBox Then
                ctrl.ResetText()
            End If
        Next
 
Back
Top