ZForge.Controls.ExplorerBar.Expando.OnMouseMove C# (CSharp) Method

OnMouseMove() protected method

Raises the MouseMove event
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs A MouseEventArgs that contains the event data
return void
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            if (e.Button == MouseButtons.Left && this.dragStart != Point.Empty)
            {
                Point p = this.PointToScreen(new Point(e.X, e.Y));

                if (!this.dragging)
                {
                    if (Math.Abs(this.dragStart.X - p.X) > 8 || Math.Abs(this.dragStart.Y - p.Y) > 8)
                    {
                        this.dragging = true;

                        this.FocusState = FocusStates.None;
                    }
                }

                if (this.dragging)
                {
                    if (this.TaskPane.ClientRectangle.Contains(this.TaskPane.PointToClient(p)))
                    {
                        this.Cursor = Cursors.Default;
                    }
                    else
                    {
                        this.Cursor = Cursors.No;
                    }

                    this.TaskPane.UpdateDropPoint(p);

                    return;
                }
            }

            // check if the mouse is moving in the titlebar area
            if (e.Y < this.HeaderHeight && e.Y > (this.HeaderHeight - this.TitleBarHeight))
            {
                // change the cursor to a hand and highlight the titlebar
                this.FocusState = FocusStates.Mouse;
            }
            else
            {
                // reset the titlebar highlight and cursor if they haven't already
                this.FocusState = FocusStates.None;
            }
        }