I'm not sure exactly how to start this project, but my requirements are as follows (for the parts that I'm unsure of how to implement):
I haven't started this yet, but which project type would be best for this? I was thinking WPF over WindowsForms since it seems to offer a lot more flexibility in terms of presentation. Any advice on the above points would be greatly appreciated!
In WPF, you can do it this way:
For the global TAB key handling, at the entry point of your application (usually App.xaml.cs), run this code:
EventManager.RegisterClassHandler(typeof(UIElement), UIElement.PreviewKeyUpEvent, new KeyEventHandler(OnPreviewKeyUp));
Use (Preview)Key(up/Down)Event as you need it, if you set e.Handled = true in a Preview event handler, the event will stop its routing and nobody else will be able to react to it.
In OnPreviewKeyUp, check that e.Key == Key.Tab
, and show the overlay window if it is.
The signature of the event handler should look like:
private static void OnPreviewKeyUp(object source, KeyEventArgs e)
Now for the click-through part, make a Window and set the background of your overlay to null
:
WindowStyle="None" AllowsTransparency="True" Background="{x:Null}"