i have written a small form application, which contains textbox only. I have enabled shortcut key by using low level keyboard hook to give focus to application when needed. All is working fine, I press the short key i.e. (Left Control Key)+(Left Control Key) for the first time the application get proper control (focus). But when I deactivate and redo the shortcut key, the icon of the application on the taskbar starts blinking and the form doesn't get focus, the title bar is greyed out.
More Information :
- on deactivation the form's opacity is reduced but it remains on top, so the whole time the form is displayed on the screen
- This form is activated from another class, within the application.
- On Activation event opacity of the form is increased so it now very well visible
I am giving focus to the application by using form.Activate() I have also tried from.Visible but with no luck. The activation works for the first time only, post that the icon in taskbar blinks.
Does any have any idea why is this happening?