Of course we can't tell you because you have not given us a complete code sample. Where is that method assigned to the KeyDown event of your textbox. The fact that the "d" in your method signature is lowercase indicates that the event was not generated automatically by the IDE (either in the code window or through the Properties window).