detect keypression when minimized and trayicon

前端 未结 1 554
执笔经年
执笔经年 2020-12-21 06:36

For my test I\'ve created a little program in C# to detect key presses with this code:

protected override void OnKeyDown(KeyEventArgs e)
{
    if (e.KeyCode          


        
相关标签:
1条回答
  • 2020-12-21 07:20

    Your form will only receive keypress events when it has focus, to receive other keypress events you would need to register a global hotkey.

    http://www.dreamincode.net/forums/topic/180436-global-hotkeys/

    0 讨论(0)
提交回复
热议问题