现在的位置: 首页 > 综合 > 正文

怎样更好的实现C#自定义全局热键?

2012年01月23日 ⁄ 综合 ⁄ 共 4422字 ⁄ 字号 评论关闭
C7HotKey

 

在Form_Load或者其他事件中调用RegisterHotKey方法就可以了。但是现在的问题是还是必须在Form中执行:

protected override void WndProc(ref Message m)
        {
            if (this.hotkey != null)
            {
                hotkey.RunMethod(m);
            }
            base.WndProc(ref m);
        }

 

不知道怎么能在Form中只是Register,其他的都不用管呢?

抱歉!评论已关闭.