WebBrowser.WebBrowserShortcutsEnabled 屬性

定義

取得或設定值,表示 WebBrowser 控制項內是否已啟用鍵盤快速鍵。

public:
 property bool WebBrowserShortcutsEnabled { bool get(); void set(bool value); };
public bool WebBrowserShortcutsEnabled { get; set; }
member this.WebBrowserShortcutsEnabled : bool with get, set
Public Property WebBrowserShortcutsEnabled As Boolean

屬性值

如果這個控制項內已啟用鍵盤快速鍵則為 true,否則為 false。 預設為 true

範例

下列程式碼範例示範如何使用 WebBrowserShortcutsEnabled 屬性。

webBrowser1.WebBrowserShortcutsEnabled = false;
webBrowser1.WebBrowserShortcutsEnabled = False

備註

將此屬性設定為 false,以防止使用者使用 Internet Explorer 鍵盤快速鍵搭配 WebBrowser 控制項。 當您想要隱藏您正在使用 WebBrowser 控制項的事即時,例如建立可順暢地結合 DHTML 型控制項與Windows Forms控制項的使用者介面時,這會很有用。

您可以將 和 IsWebBrowserContextMenuEnabled 屬性設定 AllowWebBrowserDropfalse ,以停用其他標準瀏覽器功能。

適用於

另請參閱