Reputation: 8025
I set Ctrl + Space to do this:
If Form1 is focus, hide it.
If Form1 is being hidden, or it isn't being focus, show and focus it (SetForegroundWindow).
I almost finish my work, the only thing is I don't know how to detemine if my Form1 is in focus or not. Can you help me? Thank a lot!!!
Upvotes: 0
Views: 154
Reputation: 16310
Handle in Form.Activated event when the form is focus..
Similarly, when form is out of focus, handle it on Form.Deactivate event....
Upvotes: 2