The question is very unclear, but I think I can guess what's the problem. Indeed, with a virtual keyboard, when you click on a key, you need some target application to be active, so the simulated keyboard input would be dispatched to this application; at the same time, to be able to click a key on a virtual keyboard, you need to have it on top.
Therefore, we have some seemingly contradictory requirements for the virtual keyboard window; and this problem can be resolved by giving it pretty unusual combination of window parameters: it should be "always on top" and "no activate" at the same time. This is quite possible through overriding the virtual method
System.Windows.Forms.Form.CreateParams
:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.createparams.aspx[
^].
I've shown a complete solution in my past answer:
Application focus getting and losing[
^].
Please also see:
Creating a Virtual Keyboard[
^].
—SA