ToolStripItem.IsInputKey(Keys) 方法

定義

判斷指定的按鍵是標準輸入按鍵或需要前置處理的特殊按鍵。Determines whether the specified key is a regular input key or a special key that requires preprocessing.

protected public:
 virtual bool IsInputKey(System::Windows::Forms::Keys keyData);
protected internal virtual bool IsInputKey (System.Windows.Forms.Keys keyData);
abstract member IsInputKey : System.Windows.Forms.Keys -> bool
override this.IsInputKey : System.Windows.Forms.Keys -> bool
Protected Friend Overridable Function IsInputKey (keyData As Keys) As Boolean

參數

keyData
Keys

其中一個 Keys 值。One of the Keys values.

傳回

如果指定的按鍵是標準輸入按鍵,則為 true,否則為 falsetrue if the specified key is a regular input key; otherwise, false.

備註

在視窗訊息前置處理期間呼叫 IsInputChar 方法,以判斷指定的索引鍵是否為一般輸入索引鍵,應直接傳送至 ToolStripItem 或應處理的特殊索引鍵(例如 PAGE UP、PAGE DOWN、ENTER、ESC、TAB 或方向鍵)。Call the IsInputChar method during window-message preprocessing to determine whether the specified key is a regular input key that should be sent directly to the ToolStripItem or a special key (such as PAGE UP, PAGE DOWN, ENTER, ESC, TAB, or arrow keys) that should be preprocessed. 在後者的情況下,只有在前置處理階段未使用金鑰時,才會將其傳送至 ToolStripItemIn the latter case, the key is sent to the ToolStripItem only if it is not consumed by the preprocessing phase.

安全性

UIPermission
適用于繼承類別以呼叫這個方法的所有視窗。For all windows for inheriting classes to call this method. 相關聯的列舉: UIPermissionWindowAllWindowsAssociated enumeration: the AllWindows value of UIPermissionWindow

適用於

另請參閱