System.Windows.Forms.ButtonBase.OnMouseMove(System.Windows.Forms.MouseEventArgs)

Here are the examples of the csharp api class System.Windows.Forms.ButtonBase.OnMouseMove(System.Windows.Forms.MouseEventArgs) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

13 Examples 7

1. Example

View license
protected override void OnMouseMove(MouseEventArgs mevent) {
            base.OnMouseMove(mevent);
            _mouseState = MouseState.Move;
            Invalidate();
        }

2. Example

Project: clrprofiler
Source File: DiffTreeListView.cs
View license
override protected void OnMouseMove(MouseEventArgs e)
		{
			Cursor oldCursor = Cursor, toSet = Cursors.Arrow;
			if(pressed)
			{
				base.OnMouseMove(e);
			}
			else
			{
				int index = columnsRef.IndexOf(this);
				int left = 0;
				int right = this.Width;
				if(e.X - left < 5 && index != 0 || right - e.X < 5)
				{
					toSet = Cursors.VSplit;
				}
			}

			if(oldCursor != toSet)
			{
				Cursor = toSet;
			}
		}

3. Example

Project: clrprofiler
Source File: TreeListView.cs
View license
override protected void OnMouseMove(MouseEventArgs e)
		{
			Cursor oldCursor = Cursor, toSet = Cursors.Arrow;
			if(pressed)
			{
				base.OnMouseMove(e);
			}
			else
			{
				int index = columnsRef.IndexOf(this);
				int left = 0;
				int right = this.Width;
				if(e.X - left < 5 && index != 0 || right - e.X < 5)
				{
					toSet = Cursors.VSplit;
				}
			}

			if(oldCursor != toSet)
			{
				Cursor = toSet;
			}
		}

4. Example

Project: RNGReporter
Source File: GlassButton.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);
            if (e.Button != MouseButtons.None)
            {
                if (!ClientRectangle.Contains(e.X, e.Y))
                {
                    if (_isHovered)
                    {
                        _isHovered = false;
                        Invalidate();
                    }
                }
                else if (!_isHovered)
                {
                    _isHovered = true;
                    Invalidate();
                }
            }
        }

5. Example

Project: dockpanelsuite
Source File: InertButton.cs
View license
protected override void OnMouseMove(MouseEventArgs mevent)
        {
            base.OnMouseMove(mevent);

            // Is mouse point inside our client rectangle
            bool over = this.ClientRectangle.Contains(new Point(mevent.X, mevent.Y));

            // If entering the button area or leaving the button area...
            if (over != m_mouseOver)
            {
                // Update state
                m_mouseOver = over;

                // Redraw to show button state
                Invalidate();
            }
        }

6. Example

Project: EDDiscovery
Source File: ButtonExt.cs
View license
protected override void OnMouseMove(MouseEventArgs mevent)
        {
            // Allow a very long click to come and go from our bounds, updating the draw state the whole time.
            if (ClientRectangle.Contains(mevent.Location))
                SetDrawState(mevent.Button == MouseButtons.Left ? DrawState.Click : DrawState.Hover);
            else
                SetDrawState(DrawState.Normal);       // OnMouseLeave doesn't actually fire until /after/ LMB is released, so clear this here.

            base.OnMouseMove(mevent);
        }

7. Example

Project: ArnoldSimulator
Source File: InertButton.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
		{
			base.OnMouseMove(e);

			// Is mouse point inside our client rectangle
			bool over = this.ClientRectangle.Contains(new Point(e.X, e.Y));

			// If entering the button area or leaving the button area...
			if (over != m_mouseOver)
			{
				// Update state
				m_mouseOver = over;

				// Redraw to show button state
				Invalidate();
			}
		}

8. Example

Project: DarkUI
Source File: DarkButton.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            if (_spacePressed)
                return;

            if (e.Button == MouseButtons.Left)
            {
                if (ClientRectangle.Contains(e.Location))
                    SetButtonState(DarkControlState.Pressed);
                else
                    SetButtonState(DarkControlState.Hover);
            }
            else
            {
                SetButtonState(DarkControlState.Hover);
            }
        }

9. Example

Project: DarkUI
Source File: DarkCheckBox.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            if (_spacePressed)
                return;

            if (e.Button == MouseButtons.Left)
            {
                if (ClientRectangle.Contains(e.Location))
                    SetControlState(DarkControlState.Pressed);
                else
                    SetControlState(DarkControlState.Hover);
            }
            else
            {
                SetControlState(DarkControlState.Hover);
            }
        }

10. Example

Project: DarkUI
Source File: DarkRadioButton.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            if (_spacePressed)
                return;

            if (e.Button == MouseButtons.Left)
            {
                if (ClientRectangle.Contains(e.Location))
                    SetControlState(DarkControlState.Pressed);
                else
                    SetControlState(DarkControlState.Hover);
            }
            else
            {
                SetControlState(DarkControlState.Hover);
            }
        }

11. Example

Project: ynoteclassic
Source File: InertButton.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            // Is mouse point inside our client rectangle
            bool over = ClientRectangle.Contains(new Point(e.X, e.Y));

            // If entering the button area or leaving the button area...
            if (over != m_mouseOver)
            {
                // Update state
                m_mouseOver = over;

                // Redraw to show button state
                Invalidate();
            }
        }

12. Example

Project: SquareOne
Source File: InertButton.cs
View license
protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            // Is mouse point inside our client rectangle
            bool over = this.ClientRectangle.Contains(new Point(e.X, e.Y));

            // If entering the button area or leaving the button area...
            if (over != m_mouseOver)
            {
                // Update state
                m_mouseOver = over;

                // Redraw to show button state
                Invalidate();
            }
        }

13. Example

Project: Repetier-Host
Source File: ArrowButton.cs
View license
protected override void OnMouseMove(MouseEventArgs mevent)
        {
            if (!Enabled) return;
            string oldcur = currentValue;
            base.OnMouseMove(mevent);
            float percent = 0;
            int full = 0;
            if (_rotation == 0 || _rotation == 180)
            {
                full = Width;
                percent = (_rotation==0? mevent.X :Width-mevent.X) / (float)Width;
            }
            else
            {
                full = Height;
                percent = (_rotation==90 ? mevent.Y : Height-mevent.Y)/ (float)Height;
            }
            string[] vl = possibleValues.Split(';');
            int p = (int)(percent * vl.Length);
            if (p < 0) p = 0;
            if (p >= vl.Length) p = vl.Length - 1;
            currentValue = vl[p];
            hoverWidth = (p + 1) * full / vl.Length;
            Invalidate();
            if (currentValue != oldcur && arrowValueChanged != null)
                arrowValueChanged(this, currentValue);
        }