Control.ProcessDialogChar(Char) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Processes a dialog character.
protected:
virtual bool ProcessDialogChar(char charCode);
protected virtual bool ProcessDialogChar (char charCode);
abstract member ProcessDialogChar : char -> bool
override this.ProcessDialogChar : char -> bool
Protected Overridable Function ProcessDialogChar (charCode As Char) As Boolean
Parameters
- charCode
- Char
The character to process.
Returns
true
if the character was processed by the control; otherwise, false
.
Remarks
This method is called during message preprocessing to handle dialog characters, such as control mnemonics. This method is called only if the IsInputChar method indicates that the control is not processing the character. The ProcessDialogChar method simply sends the character to the parent's ProcessDialogChar method, or returns false
if the control has no parent. The Form class overrides this method to perform actual processing of dialog characters. This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control.
Notes to Inheritors
When overriding the ProcessDialogChar(Char) method in a derived class, a control should return true
to indicate that it has processed the character. For characters that are not processed by the control, the result of calling the base class's ProcessDialogChar(Char) method should be returned. Controls will seldom, if ever, need to override this method.