public static void Initialize() { if (hook == null) { hook = new MouseHook(); hook.MouseDoubleClick += new MouseHookEventHandler(hook_MouseDoubleClick); hook.Install(); } }
public MouseHookObject(MouseHook parent) { this.reference = new WeakReference(parent, false); }
public GridViewEdit(PropertyGridView psheet) { this.psheet = psheet; mouseHook = new MouseHook(this, this, psheet); }
internal DropDownHolder(PropertyGridView psheet) : base() { this.ShowInTaskbar = false; this.ControlBox = false; this.MinimizeBox = false; this.MaximizeBox = false; this.Text = ""; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.AutoScaleMode = AutoScaleMode.None; // children may scale, but we won't interfere. mouseHook = new MouseHook(this, this, psheet); Visible = false; gridView = psheet; this.BackColor = gridView.BackColor; }
protected override void OnHandleDestroyed(EventArgs e) { AdornerWindowList.Remove(this); if ((AdornerWindowList.Count == 0) && (mouseHook != null)) { mouseHook.Dispose(); mouseHook = null; } base.OnHandleDestroyed(e); }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); AdornerWindowList.Add(this); if (mouseHook == null) { mouseHook = new MouseHook(); } }