First of all, please see a comment to the question.
"To be generic", instead of sending any messages to any controls at all, you can generate the input events on low level, as it is done by the keyboard (and mouse, by the way) drivers. Then the input will be dispatched where they belong. In case of keyboard, to the control where the keyboard focus is, which is one control per whole desktop.
This can be achieved by using raw Windows API
SendInput
:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[
^].
It will require using P/Invoke, but this is already done for you:
http://www.pinvoke.net/default.aspx/user32.sendinput[
^].
You will need to solve some problems though. First of all, you don't want the keys of the virtual keyboards, which are also controls (buttons or anything else), not to grab the focus, and the virtual keyboard to grab activation. You don't really need to solve the second problem: better design could be using only one form, and then the control could be a panel (removable, collapsible, whatever), not a form. And the keys can be simply made non-focusable; after all, it would be pretty much pointless to use a keyboard to press virtual keyboard keys. However, if you still have to solve any of the problems mentioned above, please see my past answers:
Application focus getting and losing[
^],
and also, just in case:
Creating a Virtual Keyboard[
^],
Programming on BACKSPACE button[
^],
Application focus getting and losing[
^].
—SA