Hi,
I have a Win form that contains only one dynamicly created textbox control at any given time. I also use my form's KeyDown event and the textbox's KeyPress event to track and handle key trokes. In order for the form to pic up the key first, I set KeyPreview to true.
My problem is however, that the form's KeyDown event SOMETIMES doesn't fire (return key is the key I need and it is the key I used for my testing). The form KeyDown event will always fire if the textboxdoesnot present on the form. But when the textbox is created, it appears that the return key strokes sometimes get captured by the form's KeyDown event and sometimes don't.
What am I doing wrong here?
Thanks
Feng