User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 397,646 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,435 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:

vb.net code for searching

Join Date: Nov 2007
Location: Jogja
Posts: 2,448
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Rep Power: 9
Solved Threads: 212
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Nearly a Posting Maven

Re: vb.net code for searching

  #7  
May 14th, 2008
this following code to clear controls, you can add what control you want to clear :
  1. Public Sub ClearControl(ByVal root As Control)
  2. For Each ctrl As Control In root.Controls
  3. ClearControl(ctrl)
  4. If TypeOf ctrl Is TextBox Then
  5. CType(ctrl, TextBox).Text = String.Empty
  6. ElseIf TypeOf ctrl Is ComboBox Then
  7. CType(ctrl, ComboBox).Text = String.Empty
  8. End If
  9. Next ctrl
  10. End Sub
  11.  
  12. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  13. ClearControl(Me)
  14. End Sub
Last edited by Jx_Man : May 14th, 2008 at 12:22 am.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote  
All times are GMT -4. The time now is 11:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC