| | |
vb.net code for searching
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
show us your effort friend....
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: May 2008
Posts: 2
Reputation:
Solved Threads: 0
VB.NET Syntax (Toggle Plain Text)
Dim txtb() As TextBox = {txtA, txtB, txtC} For Each ctrl As TextBox In txtb ctrl.Text = "" Next
or
VB.NET Syntax (Toggle Plain Text)
For Each ctrl As Object In Me.Controls If ctrl.GetType.Name = "TextBox" Then ' do something End If Next
•
•
•
•
can you please send sample program with some search criteria,including clearing controls,validating and search criteria remains same when you click revise again in search form
We only give homework help to those who show effort
Last edited by Jx_Man; May 13th, 2008 at 10:14 pm.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Posts: 6
Reputation:
Solved Threads: 0
sub clear()
me.combobox1.clear()
me.combobox2.clear()
me.textbox1.clear()
end sub
Private Sub nameTextBox1_Validated(sender As Object, e As System.EventArgs) Handles nameTextBox1.Validated
If IsNameValid() Then
' Clear the error, if any, in the error provider.
nameErrorProvider.SetError(Me.nameTextBox1, "")
Else
' Set the error if the name is not valid.
nameErrorProvider.SetError(Me.nameTextBox1, "Name is required.")
End If
End Sub
me.combobox1.clear()
me.combobox2.clear()
me.textbox1.clear()
end sub
Private Sub nameTextBox1_Validated(sender As Object, e As System.EventArgs) Handles nameTextBox1.Validated
If IsNameValid() Then
' Clear the error, if any, in the error provider.
nameErrorProvider.SetError(Me.nameTextBox1, "")
Else
' Set the error if the name is not valid.
nameErrorProvider.SetError(Me.nameTextBox1, "Name is required.")
End If
End Sub
this following code to clear controls, you can add what control you want to clear :
vb.net Syntax (Toggle Plain Text)
Public Sub ClearControl(ByVal root As Control) For Each ctrl As Control In root.Controls ClearControl(ctrl) If TypeOf ctrl Is TextBox Then CType(ctrl, TextBox).Text = String.Empty ElseIf TypeOf ctrl Is ComboBox Then CType(ctrl, ComboBox).Text = String.Empty End If Next ctrl End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click ClearControl(Me) End Sub
Last edited by Jx_Man; May 14th, 2008 at 1:22 am.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
Similar Threads
- Search in vb.net (VB.NET)
- ListView in VB.Net (VB.NET)
- Searching for a string in an access database (Visual Basic 4 / 5 / 6)
- Is this possible with a cookie and script (HTML and CSS)
- Hamming codes encoder/decoder in C or C++ (C++)
- Interactive excel web page and vb.net (VB.NET)
- php rewrite question (PHP)
- Menu bars and tabs in VB.NET (VB.NET)
- Creating Auto-Responder in PHP (PHP)
Other Threads in the VB.NET Forum
- Previous Thread: how to import all data stored in sql to excell?
- Next Thread: MSCOMM of VB 2005
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add advanced application array assignment basic binary box button buttons center click code combo connectionstring convert cpu data database databasesearch datagrid datagridview design designer dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists firewall folder image images isnumericfuntioncall listview login map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity pan peertopeervideostreaming picturebox picturebox2 port print printpreview record regex reports" reuse right-to-left save savedialog search serial socket sorting sqldatbase sqlserver storedprocedure string temp textbox timer txttoxmlconverter upload useraccounts usercontol usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet vista visual visualbasic visualbasic.net visualstudio.net web wpf xml






