C#窗体实现热键控制窗口隐藏显示

上传者: baiduwxz13yun | 上传时间: 2021-03-30 15:53:27 | 文件大小: 797KB | 文件类型: ZIP
C#窗体实现热键控制窗口隐藏显示 主要类文件 class HotKey { //如果函数执行成功,返回值不为0。 //如果函数执行失败,返回值为0。要得到扩展错误信息,调用GetLastError。 [DllImport("user32.dll", SetLastError = true)] public static extern bool RegisterHotKey( IntPtr hWnd, //要定义热键的窗口的句柄 int id, //定义热键ID(不能与其它ID重复) KeyModifiers fsModifiers, //标识热键是否在按Alt、Ctrl、Shift、Windows等键时才会生效 Keys vk //定义热键的内容 ); [DllImport("user32.dll", SetLastError = true)] public static extern bool UnregisterHotKey( IntPtr hWnd, //要取消热键的窗口的句柄 int id //要取消热键的ID ); //定义了辅助键的名称(将数字转变为字符以便于记忆,也可去除此枚举而直接使用数值) [Flags()] public enum KeyModifiers { None = 0, Alt = 1, Ctrl = 2, Shift = 4, WindowsKey = 8 }

文件下载

资源详情

[{"title":"( 58 个子文件 797KB ) C#窗体实现热键控制窗口隐藏显示","children":[{"title":"C#窗体实现热键控制窗口隐藏显示","children":[{"title":"WebForm","children":[{"title":"WebForm","children":[{"title":"UpgradeLog.XML <span style='color:#111;'> 5.94KB </span>","children":null,"spread":false},{"title":"_UpgradeReport_Files","children":[{"title":"UpgradeReport.xslt <span style='color:#111;'> 12.21KB </span>","children":null,"spread":false},{"title":"UpgradeReport_Minus.gif <span style='color:#111;'> 69B </span>","children":null,"spread":false},{"title":"UpgradeReport.css <span style='color:#111;'> 3.27KB </span>","children":null,"spread":false},{"title":"UpgradeReport_Plus.gif <span style='color:#111;'> 71B </span>","children":null,"spread":false}],"spread":true},{"title":"WebForm.sln <span style='color:#111;'> 911B </span>","children":null,"spread":false},{"title":"Icon.ico <span style='color:#111;'> 37.44KB </span>","children":null,"spread":false},{"title":"WebForm","children":[{"title":"WebForm.csproj <span style='color:#111;'> 4.29KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"WebForm.exe <span style='color:#111;'> 150.00KB </span>","children":null,"spread":false},{"title":"WebForm.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"WebForm.pdb <span style='color:#111;'> 31.50KB </span>","children":null,"spread":false},{"title":"qqshareUpdate.exe <span style='color:#111;'> 138.50KB </span>","children":null,"spread":false},{"title":"vs.exe <span style='color:#111;'> 64.50KB </span>","children":null,"spread":false},{"title":"WebForm.vshost.exe <span style='color:#111;'> 11.34KB </span>","children":null,"spread":false},{"title":"互联网帐号共享器.exe <span style='color:#111;'> 64.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Form1.Designer.cs <span style='color:#111;'> 4.65KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"WebForm.exe <span style='color:#111;'> 150.00KB </span>","children":null,"spread":false},{"title":"WebForm.pdb <span style='color:#111;'> 31.50KB </span>","children":null,"spread":false},{"title":"WebForm.Form1.resources <span style='color:#111;'> 95.79KB </span>","children":null,"spread":false},{"title":"WebForm.csproj.GenerateResource.Cache <span style='color:#111;'> 1024B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.88KB </span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"Properties.Resources.Designer.cs.dll <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"WebForm.Properties.Resources.resources <span style='color:#111;'> 5.05KB </span>","children":null,"spread":false},{"title":"Refactor","children":null,"spread":false},{"title":"WebForm.csproj.FileListAbsolute.txt <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Resources","children":[{"title":"未命名21.jpg <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"未命名2.jpg <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"未命名.jpg <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"未命名22.jpg <span style='color:#111;'> 880B </span>","children":null,"spread":false}],"spread":true},{"title":"Form1.cs <span style='color:#111;'> 4.29KB </span>","children":null,"spread":false},{"title":"Icon.ico <span style='color:#111;'> 37.44KB </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 149.02KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 6.80KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 3.80KB </span>","children":null,"spread":false}],"spread":false},{"title":"HotKey.cs <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false}],"spread":false},{"title":"IEcon.ico <span style='color:#111;'> 95.24KB </span>","children":null,"spread":false},{"title":"WebForm.suo <span style='color:#111;'> 23.00KB </span>","children":null,"spread":false},{"title":"Backup","children":[{"title":"WebForm.sln <span style='color:#111;'> 911B </span>","children":null,"spread":false},{"title":"WebForm","children":[{"title":"WebForm.csproj <span style='color:#111;'> 4.14KB </span>","children":null,"spread":false},{"title":"Form1.Designer.cs <span style='color:#111;'> 4.65KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"Resources","children":[{"title":"未命名21.jpg <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"未命名2.jpg <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"未命名.jpg <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"未命名22.jpg <span style='color:#111;'> 880B </span>","children":null,"spread":false}],"spread":false},{"title":"Form1.cs <span style='color:#111;'> 4.21KB </span>","children":null,"spread":false},{"title":"Icon.ico <span style='color:#111;'> 37.44KB </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 149.02KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 6.80KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 3.79KB </span>","children":null,"spread":false}],"spread":false},{"title":"HotKey.cs <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false}],"spread":true},{"title":"WebForm.suo <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • sdlywjx :
    不错 ,借鉴使用。
    2018-05-12
  • czo21 :
    不错的demo,值得借鉴不错的demo,值得借鉴
    2018-04-19
  • test4153 :
    不错的demo,值得借鉴
    2017-10-13
  • sankwang :
    挺好用的。
    2016-09-07
  • ywapy :
    相当不错,用热键控制窗口隐藏显示,赞一个
    2015-11-26
  • 黑户码农 :
    不错,有用,可以运行。谢谢
    2015-10-12
  • fangcuenshan :
    感觉有点复杂...~!
    2015-09-23
  • 剑吟风 :
    具有参考价值,下载后已收藏
    2015-01-08
  • mycroo :
    相当不错,用热键控制窗口隐藏显示,赞一个
    2014-05-31
  • 晓兮 :
    非常不错,感谢分享。用hook实现的。
    2014-04-07

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明