获取鼠标双击时间间隔

实现效果:

  

知识运用:
  API函数 GetDoubleClickTime  //
判断连续两次鼠标单击之间会被处理成双击事件的时间间隔  单位毫秒

实现代码:

        [DllImport("user32.dll", EntryPoint = "GetDoubleClickTime")]
        public extern static int GetDoubleClickTime();              //重写API函数
        private void Form1_Load(object sender, EventArgs e)
        {
            label2.Text = GetDoubleClickTime() + "毫秒";            //显示间隔秒数 
        }

  

猜你喜欢

转载自www.cnblogs.com/feiyucha/p/10280528.html