VB.NET Detecting Keypress While Minimized

后端 未结 3 994
梦谈多话
梦谈多话 2020-12-12 06:38

I want to be able to detect when the user presses F10 or Ctrl+F10 outside of my program, and upon receiving the key press, it will send text to whatever they currently have

3条回答
  •  鱼传尺愫
    2020-12-12 06:51

    Use RegisterHotkey and not a keyboard hook to get a global hotkey.

    See one of my older answers on almost the same question: listen for a key when the application is not focused

提交回复
热议问题