消息过滤

 MouseDownFilter mouseFilter = new MouseDownFilter();
            Application.AddMessageFilter(mouseFilter);
    class MouseDownFilter:IMessageFilter 
    {

        public bool PreFilterMessage(ref Message m)
        {
            if (m.Msg==0x201)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }

posted @ 2013-05-14 19:35  Predator  阅读(117)  评论(0编辑  收藏  举报