自定义双击事件

public partial class Form1 : Form,IMessageFilter
    {
        public Form1()
        {
            InitializeComponent();
            Application.AddMessageFilter(this);
        }

        private int WM_LBUTTONDBLCLK = 0x0203;

        public bool PreFilterMessage(ref Message msg)
        {
            if (msg.HWnd == this.radioButton1.Handle && msg.Msg == WM_LBUTTONDBLCLK)
            {
                MessageBox.Show("触发双击事件");
            }

            return true;
        } 
    }




源文档 <http://topic.csdn.net/u/20101110/21/c38130de-7edb-4527-b3da-e964a3c37fc7.html?99703> 
posted @ 2013-08-14 20:14  把爱延续  阅读(650)  评论(0编辑  收藏  举报