This article explains how to do it:
A Simple C# Global Low Level Keyboard Hook[
^]
You need a keyboard hook to restore the window ...
The following two articles demonstrates how you can integrate native C++ code and managed code:
Using ACE with C++ CLI[
^]
Integrating ACE and ATL[
^]
Develop your Windows Forms stuff using C#, C++/CLI, or any other language supporting the CLR.
Info about creating native keyboard hooks:
Using Hooks[
^]
KeyBoard Hooks[
^]
Personally I prefer to do managed stuff in C# - and use P/Invoke, C++/CLI or COM to access native functionality.
Best regards
Espen Harlinn