S
splat007
Hi Everyone
I am developing a C# desktop application which has multiple forms
active at a given time.
The user wants the forms to be accessible by keyboard shortcuts even
when the application doesnt have focus.
I have written a keyboard hook which can capture shortcuts and then
activate the corresponding form.
By activate I mean the form becomes visible and focus is set on the
form.
Here is the code that I call when the form needs to be activated:
f.Show();
f.Activate();
Everything works fine when the focus is set on any of the application
windows. However if the focus is on some other application and I
activate the Form, the title bar blinks but the form doesn't get
activated.
Any ideas as to why I am not able set focus to my form, when the
user's focus is on another application?
Thanks in advance
Splat
I am developing a C# desktop application which has multiple forms
active at a given time.
The user wants the forms to be accessible by keyboard shortcuts even
when the application doesnt have focus.
I have written a keyboard hook which can capture shortcuts and then
activate the corresponding form.
By activate I mean the form becomes visible and focus is set on the
form.
Here is the code that I call when the form needs to be activated:
f.Show();
f.Activate();
Everything works fine when the focus is set on any of the application
windows. However if the focus is on some other application and I
activate the Form, the title bar blinks but the form doesn't get
activated.
Any ideas as to why I am not able set focus to my form, when the
user's focus is on another application?
Thanks in advance
Splat