MouseHook Class
Provides an implementation of a mouse hook.
public class MouseHook : HookBase, IDisposable
- Implements:
- IDisposable
Constructors
MouseHook(IMouseHookCallback)
Initializes a new instance of the MouseHook
class.
public MouseHook(IMouseHookCallback hookOwner)
Parameter | Type | Description |
---|---|---|
hookOwner | IMouseHookCallback | The owner of the hook. |
Methods
OnHookCallback(int, nint, nint)
Called when the hook receives a callback.
protected override bool OnHookCallback(int code, nint wParam, nint lParam)
Parameter | Type | Description |
---|---|---|
code | int | The hook code. |
wParam | nint | The first parameter. |
lParam | nint | The second parameter. |
Returns
- bool:
Whether the hook has been handled.