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