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.

傳回

Boolean

如果指定的按鍵是標準輸入按鍵,則為 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.

適用於

另請參閱