Global HotKey / WndProc / Message.LParam

zattz
zattz used Ask the Experts™
on
Hi

I am trying to install a global hot key.

Where can I find out the value to use in the LParam?

Thanks


protected override void WndProc(ref Message m)
          {
            if (m.Msg == 0x0312)
            {
                if (m.LParam.ToInt32() == 4718594)
                {
                  ...
                }
            }

            base.WndProc(ref m);
         }
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Here is one nice way of implementaion of Global Hotkey with Hook and RegisterHotkey
http://www.liensberger.it/web/blog/?p=207

Another example her
http://www.codeproject.com/KB/miscctrl/systemhotkey.aspx

Author

Commented:
I know how to implement the hotkey. I don't know how to specify Ctrl+H (or something else) as the LParam

Author

Commented:
no
Commented:
I decided to just do a MessageBox.Show(m.LParam.ToInt32())

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial