Instead of trying to handle the search in the key events of the Textbox, add a Search button, now assign it to the AcceptButton property of the form. Now, whenever the Enter key is pressed, the Search button will be clicked, giving you the same result without having to handle key events.