This documentation is archived and is not being maintained.

MaskedTextBox.ProcessKeyMessage Method

Note: This method is new in the .NET Framework version 2.0.

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
JScript does not support passing value-type arguments by reference.



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 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0