How can I programmatically manipulate the on-screen keyboard of Windows 7 osk: Move, Resize, Remove Titlebar / Caption

I am working on a WPF application where I want to display the Windows 7 built-in on-screen keyboard "always there." Therefore I want:

  • Move it to a specific place

  • Set it to a specific width and height

  • Delete the title / title so that the user cannot move or close it.

  • Remove this error to resize it (or any other user settings, for that matter).

I tried all the typical API functions (MoveWindow, SetWindowPos, SetWindowLong, etc.), but it does not want to do anything. The code currently works with all other processes and applications (for example, Internet Explorer and the command line); it is almost as if api calls did not extend to osk, or that they are "locked". What am I missing? Thanks in advance.

+4
source share
1 answer

I checked with Spy ++, and the on-screen keyboard uses something called DirectUIHWND. You might want to learn the DirectUIHWND API.

Perhaps a useful link:

In addition, some people warn that DirectUI is undocumented .

+4
source

Source: https://habr.com/ru/post/1347395/


All Articles