Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IMessageFilter Interface

Defines a message filter interface.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public interface IMessageFilter

The IMessageFilter type exposes the following members.

  NameDescription
Public methodPreFilterMessageFilters out a message before it is dispatched.
Top

This interface allows an application to capture a message before it is dispatched to a control or form.

A class that implements the IMessageFilter interface can be added to the application's message pump to filter out a message or perform other operations before the message is dispatched to a form or control. To add the message filter to an application's message pump, use the AddMessageFilter method in the Application class.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft