日期:2014-05-18  浏览次数:20936 次

怎样在固定的时间监听鼠标在固定的窗体的单击事件??????
请各位高手指点啊!!!!

------解决方案--------------------
用筛选器

C# code

    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
    public class TestMessageFilter : IMessageFilter
    {
        public bool PreFilterMessage(ref Message m)
        {
            if (m.Msg >= 513 && m.Msg <= 515)
            {
                Console.WriteLine("点击了 : " + m.Msg);
            }
            return false;
        }
    }

主窗体初始化时
        public Form1()
        {
            InitializeComponent();
            TestMessageFilter filter = new TestMessageFilter();
            Application.AddMessageFilter(filter);
        }