07 2017 档案

摘要:winform程序一般是不允许非主线程操作ui,单可以通过线程与委托的方式并结合Control类提供的BeginInvoke机制进行ui更改 如下,这是更新ui的方法 1:创建委托 2:给委托添加方法 3:创建invoke方法 4.创建线程 阅读全文
posted @ 2017-07-13 17:05 孤夏 阅读(264) 评论(0) 推荐(0)
摘要:private void textBox1_KeyPress(object sender, KeyPressEventArgs e){ byte[] array = System.Text.Encoding.Default.GetBytes(e.KeyChar.ToString()); if (!c 阅读全文
posted @ 2017-07-11 16:19 孤夏 阅读(286) 评论(0) 推荐(0)
摘要:[DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int 阅读全文
posted @ 2017-07-11 16:11 孤夏 阅读(446) 评论(0) 推荐(0)