NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Application.AddMessageFilter

Adds a message filter to monitor Windows messages as they are routed to their destinations.

[Visual Basic]
Public Shared Sub AddMessageFilter( _
   ByVal value As IMessageFilter _
)
[C#]
public static void AddMessageFilter(
   IMessageFilter value
);
[C++]
public: static void AddMessageFilter(
   IMessageFilter* value
);
[JScript]
public static function AddMessageFilter(
   value : IMessageFilter
);

Parameters

value
The IMessageFilter you want to install.

Remarks

Use a message filter to prevent specific events from being raised or to perform special operations for an event before it is passed to an event-handling method. Message filters are unique to a specific thread.

To prevent a message from being dispatched, the value parameter instance that you pass to this method should override the PreFilterMessage method with the code to handle the message. The method should return false.

CAUTION   Adding message filters to an application's message pump can cause performance degradation in your application.

Requirements

NGWS Runtime Security:

UIPermission You must have the System.security.Permissions.UIPermission for AllWindows to set this method.

See Also

Application Class | Application Members | System.WinForms Namespace