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方法, false如果控制項沒有父系,則會傳回。 ProcessDialogCharThe 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列舉: UIPermissionWindow的值。Associated enumeration: AllWindows value of UIPermissionWindow.

適用於