The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Control.OnNotifyMessage Method

Notifies the control of Windows messages.

[Visual Basic]
Protected Overridable Sub OnNotifyMessage( _
   ByVal m As Message _
protected virtual void OnNotifyMessage(
 Message m
protected: virtual void OnNotifyMessage(
 Message m
protected function OnNotifyMessage(
   m : Message


A Message that represents the Windows message.


The OnNotifyMessage method is called if the control's ControlStyles.EnableNotifyMessage style bit is set. The EnableNotifyMessage style allows the control to be notified when the WndProc method receives a Windows message. This method allows semi-trusted controls to listen for Windows messages without allowing them to modify the message.

Notes to Inheritors:  When overriding OnNotifyMessage in a derived class, calling the base class's OnNotifyMessage method is not necessary because there is no initial implementation.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Control Class | Control Members | System.Windows.Forms Namespace

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft