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, IntPtr, IntPtr)
Called when the hook receives a callback.
protected override bool OnHookCallback(int code, IntPtr wParam, IntPtr lParam)
Parameter | Type | Description |
---|---|---|
code | int | The hook code. |
wParam | IntPtr | The first parameter. |
lParam | IntPtr | The second parameter. |
Returns
- bool:
Whether the hook has been handled.