grip003
Regular
I am having a very strange problem with the current application I am writing. I am using mdi for all forms, with a single parent form. I open form 1 first, which contains a textbox with a keypress event that picks up when the enter key is pressed. It works fine, until I open form 2 and then set my focus back to form 1. It's like the keypress event no longer fires in form 1. However, if I close form 2 and go back to form 1, the keypress event works again. To clarify:
1) Open form 1 -> keypress works
2) Open form 2
3) Go back to form 1 -> keypress doesn't work
4) Go to form 2 and close it
5) Go back to form 1 -> keypress works
I'm really stumped on this one. If anyone has any ideas or has seen this and found a way around it, please let me know. Oh, just in case this is a question, neither form has the keypreview set to true. Thanks.
1) Open form 1 -> keypress works
2) Open form 2
3) Go back to form 1 -> keypress doesn't work
4) Go to form 2 and close it
5) Go back to form 1 -> keypress works
I'm really stumped on this one. If anyone has any ideas or has seen this and found a way around it, please let me know. Oh, just in case this is a question, neither form has the keypreview set to true. Thanks.