資源簡介
定時自動按鍵
代碼片段和文件信息
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Runtime.InteropServices;
using?System.Diagnostics;
using?System.Collections;
using?System.Windows.Forms;
using?System.IO;
using?System;
using?System.Threading;
public?class?HotKeys
{
????//引入系統API
????[DllImport(“user32.dll“)]
????static?extern?bool?RegisterHotKey(IntPtr?hWnd?int?id?int?modifiers?Keys?vk);
????[DllImport(“user32.dll“)]
????static?extern?bool?UnregisterHotKey(IntPtr?hWnd?int?id);
????int?keyid?=?10;?????//區分不同的快捷鍵
????Dictionary?keymap?=?new?Dictionary();???//每一個key對于一個處理函數
????public?delegate?void?HotKeyCallBackHanlder();
????//組合控制鍵
????public?enum?HotkeyModifiers
????{
????????Alt?=?1
????????Cont
- 上一篇:C# 實現 虛擬桌面
- 下一篇:html5 websocket 通訊
評論
共有 條評論