Search Box in Visual Basic

bunnyali2011's Avatar, Join Date: Mar 2011
Newbie Member
Now, imagine there is search box (textbox), and below there are a search button with a rich text box.

My text file located in the drive C is like this:

Product: Cement Size: Big: Cost: 245 Type: Construction
Product: Iron Size: Big Cost: 123 Type: Consruction
Product: Glass Size: Small Cost: 23 Type: Non-Construction
Product: Chocolate Size: Small Cost: 10 Type: Food

I want to search only two types of items in my text file located in drive C, namely: Construction and Non-construction. When the user will type a product name, OR size, OR whatever, he must get results only for the Construction or Non-construction. The user must not get results for the Food. And the user can make misspelling of words in the search, so the Search box must tackle it. And yes, the results should appear on the rich text box on the form itself.

My questions are:


1/ What is the code of doing the Search according the criteria above?
2/ What is the code to put the results on the rich text box?

Thank you!
0
virxen's Avatar, Join Date: Nov 2009
Pro contributor
use the split method to determine the type of the product

http://www.homeandlearn.co.uk/net/nets7p7.html

if the product has the desired type add it into the rich text box

http://www.startvbdotnet.com/controls/rtb.aspx