This documentation is archived and is not being maintained.

MaskedTextBox.ProcessKeyMessage Method

Overrides the base implementation of this method to handle input language changes.

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

protected internal override bool ProcessKeyMessage (
	ref Message m
protected boolean ProcessKeyMessage (
	/** @ref */ Message m
Not applicable.



The Message object containing a description of the key pressed.

MaskedTextBox overrides its base control's implementation of ProcessKeyMessage to properly handle character events when the user is entering characters using an Input Method Editor (IME), such as is used for entering Japanese, Chinese, and other complex non-Latin scripts. ProcessKeyMessage detects any WM_CHAR messages that occur after it receives a WM_IME_CHAR message and suppresses them in order to prevent these characters from showing up in the control. If you derive from this control and override this message, you should duplicate this behavior if you wish your new control to work with IMEs.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0