Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have a Windows form application that i'm developing on a windows 7 machine. i created my own touch screen keyboard form within my project... when i run my app.. i call the keyboard as needed but when i press a key nothing happens.. if i open notepad and select the keys ... the key values are displayed in note pad... it looks like my keyboard stills focus from the textboxes ...
Sergey Alexandrovich Kryukov 14-Aug-15 16:04pm    
There is no such problem, to send a key value. There is a problem of creation of touch screen keyboards. If you want to create one, ask appropriate questions. If you don't know how to send a key, your you did not really create one. I would advise to prototype most essential part of functionality before getting to less essential part.

1 solution

Please see my comment to the question.

See also my past answers on virtual keyboards:
How to fire a Key Press event of a Key on button click in WPF [1],
How to fire a Key Press event of a Key on button click in WPF [3],
Application focus getting and losing.

Don't pay attention that some answers are related to WPF (and the last one is specific to System.Windows.Forms, the principles are the same. The main idea is: if you need to develop system-wide virtual keyboard, you cannot rely on anything specific, such as message pumping (not used at the level of WPF controls or some other Windows software). The approach should be universal and low-level, hence SendInput.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900