0

In a Winforms app running on Windows 10 (Anniversary or greater), is there a way to detect that the Windows onscreen keyboard has opened?

Sean Kearon
  • 10,987
  • 13
  • 77
  • 93

1 Answers1

1

You can periodically enumerate all windows and search for DirectUIHWND class.

For the more info about windows enumeration, take a look to http://improve.dk/finding-specific-windows/

SeNS
  • 196
  • 2
  • 11
  • Thanks - it's a shame that there's not a cleaner way to do this! – Sean Kearon Feb 28 '17 at 17:36
  • Sean, UWP apps can detect it by using standard Windows Runtime API, but your app must be an UWP. However you need something different, for the good old fashioned WinForms. Hopefully new UI "things" sometime are using good old windows :) – SeNS Feb 28 '17 at 19:50
  • Thanks, SeNS - I must get around to digging myself out of Winforms sometime! :) – Sean Kearon Mar 01 '17 at 10:22