随笔分类 - wpfAPI
摘要:在wpf中的全局键和form中有些差异,所以在这里记录一下,有用到得朋友可以试试!首先注册APi代码1[DllImport("user32.dll")]2publicstaticexternboolRegisterHotKey(IntPtrhWnd,intid,uintcontrol,System.Windows.Forms.Keyskeys);3[DllImport("user32.dll")]4publicstaticexternboolUnregisterHotKey(IntPtrhWnd,intid);首先在这里事件里注册一个hotkey 并添加
阅读全文