コード例 #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);
        }