다음을 통해 공유


WebBrowser.IsWebBrowserContextMenuEnabled 속성

정의

컨트롤의 WebBrowser 바로 가기 메뉴를 사용할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

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

속성 값

컨트롤 바로 가기 메뉴를 사용하도록 설정하면 /&A이고, 그렇지 않으면 .입니다. 기본값은 true입니다.

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 줍니다 IsWebBrowserContextMenuEnabled .

webBrowser1.IsWebBrowserContextMenuEnabled = false;
webBrowser1.IsWebBrowserContextMenuEnabled = False

설명

기본적으로 컨트롤은 WebBrowser 사용자가 마우스 오른쪽 단추로 클릭할 때 바로 가기 메뉴를 표시합니다. 이 동작은 컨트롤을 일반 브라우저로 사용할 때 유용합니다. 예를 들어 웹 기반 컨트롤과 Windows Forms 컨트롤을 원활하게 결합하는 사용자 인터페이스를 만들려면 컨트롤을 사용 WebBrowser 한다는 사실을 숨기려면 속성을 false로 설정합니다 IsWebBrowserContextMenuEnabled .

WebBrowserShortcutsEnabled 속성을 false로 설정하여 다른 표준 브라우저 기능을 사용하지 않도록 설정할 AllowWebBrowserDrop 수 있습니다.

적용 대상

추가 정보