magine 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 question is:


1/ What is the code of doing the Search according the criteria above?

All I know I have made a srteamreader code but when clicking on the search button, it is giving me all the texts i wrote in the text files. However, I want only some lines to be read.


Thank you!

Recommended Answers

All 3 Replies

I'll work on this by converting my vb6 code to .net and i will post as soon as I can.

Feel better now?;)

You guys gave me a good laugh!:)

My subject is visual basic.

SNIP

Thank you man, I'm doing the documentation in the meantime! If you want information ask me, as I mentioned, all I want is a search feature, where the user has to put data to search in the drive C, and the result will appear on the multiline textbox. The user can make misspelling mistake, so the searchbox should be ready for that. And only 2 specific items in the text file should be included for the search!

commented: does not know how to behave in a public forum. -2
commented: please keep it pleasant -2

The code seems to include arrays in streamreader.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.