Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Clear All Button Code
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
12yearoldprogrammer




PostPosted: Tue Feb 21, 2012 5:57 pm   Post subject: Clear All Button Code

Hey I'm looking For the code that clears or resets All TextBoxes? Anything that works will Help Thanks
Sponsor
Sponsor
Sponsor
sponsor
Night




PostPosted: Sun Feb 26, 2012 1:44 am   Post subject: RE:Clear All Button Code

You might have to do everything manually, e.g.:

code:
Textbox1.Text = Nothing
Textbox2.Text = Nothing
Textbox3.Text = Nothing
Textbox4.Text = Nothing


* VB.NET code, use = null in VB6 or = "" in either

or you might get away with unloading and reloading the form (might have to have a separate form to do that).

There's probably an easier/better way, though I can't test any at the moment.
D_homes




PostPosted: Mon Apr 09, 2012 5:56 pm   Post subject: Re: Clear All Button Code

Yea, it has to be done manually. If you've got your TextBoxes in a control array it would be easier to clear them out though.

i.e
code:
For x As Integer = 1 To numberOfTextBoxes
     txtBox(x).Text = Nothing
Next
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: