Control.ProcessDialogChar(Char) Control.ProcessDialogChar(Char) Control.ProcessDialogChar(Char) Control.ProcessDialogChar(Char) Method

定義

處理對話方塊字元。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

參數

charCode
Char Char Char Char

要處理的字元。The character to process.

傳回

如果字元已由控制項處理,則為 true,否則為 falsetrue if the character was processed by the control; otherwise, false.

備註

訊息處理對話方塊字元,例如控制項的助憶鍵前置處理期間,會呼叫這個方法。This method is called during message preprocessing to handle dialog characters, such as control mnemonics. 只有當呼叫這個方法IsInputChar方法會指示控制項未處理的字元。This method is called only if the IsInputChar method indicates that the control is not processing the character. ProcessDialogChar方法只是傳送至父代的字元ProcessDialogChar方法,則傳回false如果控制項沒有父代。The ProcessDialogChar method simply sends the character to the parent's ProcessDialogChar method, or returns false if the control has no parent. Form類別會覆寫此方法以執行實際處理對話方塊字元。The Form class overrides this method to perform actual processing of dialog characters. 當控制項裝載在 Windows Forms 應用程式,或為 ActiveX 控制項時,只會呼叫這個方法。This method is only called when the control is hosted in a Windows Forms application or as an ActiveX control.

給繼承者的注意事項

在覆寫ProcessDialogChar(Char)方法在衍生類別中的,控制項應該傳回true指出它已處理的字元。When overriding the ProcessDialogChar(Char) method in a derived class, a control should return true to indicate that it has processed the character. 控制項,也就是呼叫基底類別的結果不會處理的字元ProcessDialogChar(Char)方法應該傳回。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.

安全性

UIPermission
繼承類別呼叫這個方法的所有視窗。for all windows for inheriting classes to call this method. 相關聯的列舉型別:AllWindows的值UIPermissionWindowAssociated enumeration: AllWindows value of UIPermissionWindow.

適用於