Global hotkey does not work in full screen mode

I create a program for taking screenshots from the game, from the game. When I press a hot key, it works, but when the game is open in full screen mode, it does not detect the key.

My code is:

protected override void WndProc(ref Message m)
{
    const int WM_HOTKEY = 0x0312;

    switch (m.Msg)
    {
        case WM_HOTKEY:
        {
            if ((short)m.WParam == 1)
            {
                start = DateTime.Now;
                progressBar1.Maximum = 1;
                progressBar1.Step = 1;
                progressBar1.Value = 0;

                DoRequest();
            }
            break;
        }

        default:
        {
            base.WndProc(ref m);
            break;
        }
    }
}

I register a global key using:

RegisterHotKey(this.Handle, 1, (int)KeyModifier.None, Keys.F11);

Help me:/

DECIDE! Solved, I managed to solve this project: http://www.codeproject.com/Articles/19004/A-Simple-C-Global-Low-Level-Keyboard-Hook

Thanks everyone!

+4
source share
2 answers

( ) , DirectInput (DirectX), Windows, . , , , , DirectX. ref: DirectInput

+2

, , .

0

All Articles