uwking

导航

2011年4月12日 #

最新版C#实现快捷键(系统热键)响应 以及事件调用

摘要: 在MainForm中申明函数MainForm(){[System.Runtime.InteropServices.DllImport("user32.dll")] //申明API函数 public static extern bool RegisterHotKey( IntPtr hWnd, // handle to window int id, // hot key identifier uint fsModifiers, // key-modifier options Keys vk // virtual-key code ); [System.Runtime.Inte 阅读全文

posted @ 2011-04-12 18:04 uwking 阅读(2767) 评论(3) 推荐(0) 编辑

xml解析

摘要: List<string> xmlstr = new List<string>(); string path = @"xml文件"; //如D:\软件文档\Player\Project\48001\TaskList.xml XmlNodeReader reader = null; try { XmlDocument xd = new XmlDocument(); xd.Load(path); reader = new XmlNodeReader(xd); //创建新的XML reader while (reader.Read()) { switch ( 阅读全文

posted @ 2011-04-12 10:29 uwking 阅读(221) 评论(0) 推荐(0) 编辑