In This Article

MouseHookEventHandler Delegate

Represents the method that will handle a mouse hook callback.

public delegate bool MouseHookEventHandler(object sender, MouseHookEventArgs e)

Parameters

Name Type Description
sender object

Sender of the event.

e MouseHookEventArgs

A MouseHookEventArgs containing event data.

Returns

Type Description
bool

Remarks

When you create a MouseHookEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

Constructors

MouseHookEventHandler(object, IntPtr)

public MouseHookEventHandler(object @object, IntPtr method)
Parameter Type Description
object object
method IntPtr

Methods

BeginInvoke(object, MouseHookEventArgs, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(object sender, MouseHookEventArgs e, AsyncCallback callback, object @object)
Parameter Type Description
sender object
e MouseHookEventArgs
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual bool EndInvoke(IAsyncResult result)
Parameter Type Description
result IAsyncResult

Returns

bool

Invoke(object, MouseHookEventArgs)

public virtual bool Invoke(object sender, MouseHookEventArgs e)
Parameter Type Description
sender object
e MouseHookEventArgs

Returns

bool