語言

ToolStripManager.IsValidShortcut(Keys) 方法

定義

取得一個值,表示某個定義的快捷鍵是否有效。

public:
 static bool IsValidShortcut(System::Windows::Forms::Keys shortcut);
public static bool IsValidShortcut(System.Windows.Forms.Keys shortcut);
static member IsValidShortcut : System.Windows.Forms.Keys -> bool
Public Shared Function IsValidShortcut (shortcut As Keys) As Boolean

參數

shortcut
Keys

測試有效性的捷徑。

傳回

true如果快捷鍵有效;否則,。 false

備註

有效的快捷鍵僅為功能鍵 F1 至 F12;功能鍵搭配 CTRL、ALT 或 SHIFT 修飾鍵;或其他帶有 CTRL、ALT 或 SHIFT 修飾鍵的按鍵。 若單獨使用,CTRL、ALT 或 SHIFT 鍵及功能鍵以外的快捷鍵則不具效效力。

適用於

另請參閱