DekGenius.com
[ Team LiB ] Previous Section Next Section

IMessageFilter

System.Windows.Forms (system.windows.forms.dll)interface

This interface is implemented by classes that want to filter messages before they are dispatched to your application. You should implement the PreFilterMessage() method, to intercept messages, carry out any additional processing you require, and then either pass them on to the rest of the system (by returning false) or cancel the dispatch by returning true.

To install a message filter, you can use the Application.AddMessageFilter() method. Note that the installation of message filters can impede the performance of your application, as it requires a small block of extra code and a method call for every message dispatched.

public interface IMessageFilter {
// Public Instance Methods
   public bool PreFilterMessage(ref Message m);
}

Implemented By

Splitter

Passed To

Application.{AddMessageFilter(), RemoveMessageFilter()}

    [ Team LiB ] Previous Section Next Section