# MouseState class

Namespace: [Rhino.UI](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.ui.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class MouseState : EventArgs
```

Current mouse state when used in UserInterfaceObject virtual functions

## Properties

- [Button](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/button.md): Which button or buttons are currently pressed
- [DeviceLocation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/devicelocation.md): Where the mouse is, in device pixels of the surface this event came from.
- [DpiScale](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/dpiscale.md): Device pixels per logical pixel for the surface this event came from. 1.0 when that is not known.
- [FrustumLine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/frustumline.md): Line in frustum that the active mouse position covers
- [Location](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/location.md): Where the mouse is, in logical pixels of the surface this event came from. This is the coordinate system on screen controls are laid out in, so it is the one to hit test against.
- [View](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/view.md): View that is being used mouse tests

## Methods

- [IsMouseOver](https://developer.rhino3d.com/api/rhinocommon/type/rhino.ui.mousestate/ismouseover.md): (3 overloads) Test if the mouse is over a curve
