窗体呼入呼出问题... SetWindowPos(handle,HWND_TOP) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 窗体隐藏之后,就捕获不到击键事件了,你需要用API处理,网上有很多方法 对了,窗体在非活动时,即使是显示的,也捕获不到击键事件的,最好也用API 用API的话 用那个函数? 或者帮忙写个例子好吗? 注册热键RegisterHotKey在MSDN查找这个函数然后到网上搜索它 隐藏后两次显示要调用WIN32的API来实现 [DllImport("user32.dll", SetLastError=true)] public static extern bool RegisterHotKey( IntPtr hWnd, // handle to window int id, // hot key identifier KeyModifiers fsModifiers, // key-modifier options Keys vk // virtual-key code ); [DllImport("user32.dll", SetLastError=true)] public static extern bool UnregisterHotKey( IntPtr hWnd, // handle to window int id // hot key identifier ); 挂个键盘钩子,然后监控按键,如果按键是操作键,那么就向你的窗体(句柄)发送最大化最小化命令,用SendMessage。API参数去网上查 winform中如何把程序异常信息保存下来 C#中连接及查询Access出现的问题 C# winform 创建窗扣时句柄出错 关于asp.net应用TTS(Text-to-Speech)的问题 xml文件怎么清除根节点外的所有节点? 大家畅谈 BT搜索引擎技术 制作安装包的问题,郁闷阿,高手进!! 新手问题:在智能设备应用程序中如何连接数据库,请大侠们帮忙 关于DATAGRID 怎么让窗口中的控件大小随窗口变化而变化?? IHTMLWindow2调用滚动方法,如何确定滚动的距离或者当前滚动条的位置 求助
用API的话 用那个函数? 或者帮忙写个例子好吗?
然后到网上搜索它
public static extern bool RegisterHotKey(
IntPtr hWnd, // handle to window
int id, // hot key identifier
KeyModifiers fsModifiers, // key-modifier options
Keys vk // virtual-key code
); [DllImport("user32.dll", SetLastError=true)]
public static extern bool UnregisterHotKey(
IntPtr hWnd, // handle to window
int id // hot key identifier
);