Capturing the windows key in c# (wpf)

后端 未结 2 1645
自闭症患者
自闭症患者 2020-12-18 05:23

I have written a small program displaying sounds and images on the screen when pushing any button. I always start it when one of my little kids crawls onto my lap and start

2条回答
  •  难免孤独
    2020-12-18 05:41

    You'll need a keyboard hook. Unfortunately, this has to be done with P/Invoke; it can't be done with managed code.

    Check out Baby Smash! by Scott Hanselman. It's hosted on code plex at http://www.codeplex.com/babysmash Github at https://github.com/shanselman/babysmash

    Alternatively, check out ShapeShow on CodeProject, which is similar.

提交回复
热议问题