从网上找的源码很不齐全,自己补充了一下,有兴趣的可以看看. 首先是建立一个hook类WFChangeKey using System; using System.Reflection; using System.Runtime.InteropServices; using System.Windows.Forms; namespace WFChangeKey { class KeyboardHook { private const int WM_KEYDOWN = 0x100;//按下消息 pr…