I am doing a little application that needs the ability to search a listbox and I found LB_FINDSTRING might help me do so. I also would like to eliminate anything that does not partain to the search criteria which would be entered into a textbox. And as I back space I would like any thing that was eliminated to be put back into the listbox.

For example:

I have 306 Items in the list box. Two of wich are "earthmate" and "eartha".

If I type "earth" in the text box it will display both earthmate and eartha. However, if I type "earthm" only "earthmate" will be displayed in the listbox. What I want to do is delete the "m" from the textbox and get both eartha and earthmate displayed in the listbox again. Also if I clear the contents of the textbox I would like the listbox to be repopulated.

If you have any questions feel free to ask.