转自:http://iaiai.iteye.com/blog/1992196 obtainmessage()是从消息池中拿来一个msg 不需要另开辟空间new new需要重新申请,效率低,obtianmessage可以循环利用: //use Handler.obtainMessage(),instead of msg = new Message(); //because if there is already an Message object,that not be used by //any…
-----------------------------------------------------------‘接收窗体’代码.cs------------------------------------------------------------ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; u…
SendMessage是一个在user32.dll中声明的API函数,在C#中导入如下: using System.Runtime.InteropServices; [DllImport("user32.dll", EntryPoint="SendMessageA")] public static extern int SendMessage (IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam); 本文描述其参数…
SendMessage是一个在user32.dll中声明的API函数,在C#中导入如下: using System.Runtime.InteropServices; [DllImport("user32.dll", EntryPoint="SendMessageA")] public static extern int SendMessage (IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam); 本文描述其参数…