I have an issue regarding Sendkeys Class, as i want to use this class in order to send some keystroke to the active application. As a first step i want to test the {Enter} k
Button has focus. Button click event sends an enter keystroke. Sending an enter causes the button click event to fire. Infinite loop.
You could disable the button before and re-enable the button after the sendkeys routine is done to stop the infinite loop.
What you probably would want to do is switch the focus back to the application you want to send your keystrokes to.