示例#1
0
        /// <summary>
        /// Creates a new instance of the MouseHookComponent class
        /// and installs the hook
        /// </summary>
        /// <param name="container">Parent Component container</param>
        public MouseHookComponent(System.ComponentModel.IContainer container) : this()
        {
            container.Add(this);

            if (!base.DesignMode)
            {
                hook.Install();
            }
        }
示例#2
0
 public static void Initialize()
 {
     if (hook == null)
     {
         hook = new MouseHook();
         hook.MouseDoubleClick += new MouseHookEventHandler(hook_MouseDoubleClick);
         hook.Install();
     }
 }