예제 #1
0
 public void StartMouseRecord()
 {
     if (mh == null)
     {
         data = new List <HookData>();
         mh   = new MouseHook();
         mh.SetHook();
         mh.MouseDownEvent += Mh_MouseDownEvent;
         mh.MouseUpEvent   += Mh_MouseUpEvent;
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: MaxIv2/Touchpad
        public Form1()
        {
            InitializeComponent();

            MouseHook.Start();
            MouseHook.MouseActionLD += new EventHandler(OnLeftDown);
            MouseHook.MouseActionRD += new EventHandler(OnRightDown);
            MouseHook.MouseActionMD += new EventHandler(OnMiddleDown);
            MouseHook.MouseActionLU += new EventHandler(OnLeftUp);
            MouseHook.MouseActionRU += new EventHandler(OnRightUp);
            MouseHook.MouseActionMU += new EventHandler(OnMiddleUp);
        }