PDA手持终端 C#热键例子代码
来源:互联网 发布:顶尖数据恢复破解版 编辑:程序博客网 时间:2024/05/01 18:06
using System;
using System.Collections.Generic;
using Microsoft.WindowsCE.Forms;
using System.Runtime.InteropServices;
using System.Text;
namespace APPButton_CSharp
{
public struct HotKeyEventArgs
{
public int identifer;
}
public delegate void HotkeyDelegate(object sender, HotKeyEventArgs e);
class AppButton : MessageWindow
{
protected const int WM_HOTKEY = 0x0312;
private readonly uint F1KEY_VK = 0xC1;//APP4 F1 key
private readonly uint F2KEY_VK = 0xC2;//APP5 F2 key.
private readonly uint F3KEY_VK = 0xC3;//APP4 F1 key
private readonly uint F4KEY_VK = 0xC4;//APP5 F2 key.
private readonly uint F5KEY_VK = 0xC5;//APP6 F3 key.
private readonly uint F6KEY_VK = 0xC6;//APP6 F3 key
public readonly int keyindentifier1 = 991;
public readonly int keyindentifier2 = 992;
public readonly int keyindentifier3 = 993;
public readonly int keyindentifier4 = 994;
public readonly int keyindentifier5 = 995;
public readonly int keyindentifier6 = 996;
private HotKeyEventArgs pea;
[DllImport("coredll.dll")]
protected static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);
[DllImport("coredll.dll")]
protected static extern bool UnregisterHotKey(IntPtr hWnd, int id);
protected override void WndProc(ref Message msg)
{
object l = new object();
lock (l)
{
if (msg.Msg == WM_HOTKEY)
{
HotKeyEvent((int)msg.WParam);
}
base.WndProc(ref msg);
}
}
public void RegisterHotKey(uint vk,uint modifer)
{
RegisterHotKey(this.Hwnd, (int)vk + 10000, modifer, vk);
}
public void UnRegisterHotKey(int id)
{
UnregisterHotKey(this.Hwnd, id+10000);
}
public void HotKeyEvent(int identifer)
{
pea = new HotKeyEventArgs();
pea.identifer = identifer;
Process(this, pea);
}
public event HotkeyDelegate Process;
}
}
- PDA手持终端 C#热键例子代码
- PDA手持终端APP工程开发介绍
- 便携式PDA手持终端的低功耗处理
- PDA手持终端在固定资产盘点系统应用
- VS2008中开发手持终端程序(PDA软件)总结
- 通过配置文件对“安卓热敏打印的PDA手持终端”的按键分配功能
- VS2008中开发wince windows mobile 手持终端程序(PDA软件)
- 进销存安卓盘点机二维采集器pda扫描出入库扫码无线同步手持终端
- 手持终端智能终端PDA盘点机条码数据采集器如何采购?智能终端盘点机PDA都有哪些功能?
- C#注册热键【快捷键】代码
- 分享 silverlight oob模式下, pc连接wince winmoble PDA 手持智能终端 ,复制文件的类,和使用方法
- 教练手持终端开发
- 快递手持终端是什么?
- Android手持系统PDA打印小票
- 关于手持设备PDA的开发
- 手持终端-C5S 企业专用智能手持终端
- 知识库问答(手持终端)
- c#热键
- [ElasticSearch] 空间搜索 (一)
- 如何:使用 DataAnnotations 特性验证模型数据
- centos端口转发神器:socat安装及使用
- 时间相加
- POJ 1182 食物链(并查集)
- PDA手持终端 C#热键例子代码
- CSUOJ:经营小卖部
- js笔记
- spring-struts-mybatis整合错误集锦
- Linux系统信息查看命令
- CXGrid用法1
- hdu 5326 - Work(递归)解题报告
- 黑马程序员——C语言中变量的存储类别
- pom.xml 添加 JSON依赖的配置