首页 新闻 会员 周边 捐助

Xilium.CefGlue.WindowsForms问题在线等,禁用右键菜单

0
[已解决问题] 解决于 2018-06-01 09:29

如何禁用右键菜单?

public CefWebBrowser browser = new CefWebBrowser();

在 CefWebBrowser 上右键F12,转到定义CefWebBrowser[从元数据]

复制代码
#region 程序集 Xilium.CefGlue.WindowsForms.dll, v1.0.0.0
// 谷歌内核
#endregion

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Xilium.CefGlue;

namespace Xilium.CefGlue.WindowsForms
{
    [ToolboxBitmap(typeof(CefWebBrowser))]
    public class CefWebBrowser : Control
    {
        public CefWebBrowser();

        public string Address { get; }
        public CefBrowser Browser { get; }
        [DefaultValue("about:blank")]
        public string StartUrl { get; set; }
        public string Title { get; }

        public event EventHandler<AddressChangedEventArgs> AddressChanged;
        public event EventHandler BeforeClose;
        public event EventHandler<BeforePopupEventArgs> BeforePopup;
        public event EventHandler BrowserCreated;
        public event EventHandler<ConsoleMessageEventArgs> ConsoleMessage;
        public event EventHandler<LoadEndEventArgs> LoadEnd;
        public event EventHandler<LoadErrorEventArgs> LoadError;
        public event EventHandler<LoadingStateChangeEventArgs> LoadingStateChange;
        public event EventHandler<LoadStartEventArgs> LoadStarted;
        public event EventHandler<PluginCrashedEventArgs> PluginCrashed;
        public event EventHandler<RenderProcessTerminatedEventArgs> RenderProcessTerminated;
        public event EventHandler<StatusMessageEventArgs> StatusMessage;
        public event EventHandler<TitleChangedEventArgs> TitleChanged;
        public event EventHandler<TooltipEventArgs> Tooltip;

        protected override void Dispose(bool disposing);
        public void InvalidateSize();
        protected internal virtual void OnAddressChanged(AddressChangedEventArgs e);
        protected internal virtual void OnBeforeClose();
        protected internal virtual void OnBeforePopup(BeforePopupEventArgs e);
        protected internal virtual void OnBrowserAfterCreated(CefBrowser browser);
        protected internal virtual void OnConsoleMessage(ConsoleMessageEventArgs e);
        protected override void OnHandleCreated(EventArgs e);
        protected internal virtual void OnLoadEnd(LoadEndEventArgs e);
        protected internal virtual void OnLoadError(LoadErrorEventArgs e);
        protected internal virtual void OnLoadingStateChange(LoadingStateChangeEventArgs e);
        protected internal virtual void OnLoadStart(LoadStartEventArgs e);
        protected internal virtual void OnPluginCrashed(PluginCrashedEventArgs e);
        protected internal virtual void OnRenderProcessTerminated(RenderProcessTerminatedEventArgs e);
        protected override void OnResize(EventArgs e);
        protected internal virtual void OnStatusMessage(StatusMessageEventArgs e);
        protected internal virtual void OnTitleChanged(TitleChangedEventArgs e);
        protected internal virtual void OnTooltip(TooltipEventArgs e);
    }
}
复制代码

 

大da脸的主页 大da脸 | 初学一级 | 园豆:73
提问于:2018-05-15 08:52
< >
分享
最佳答案
0

把某个方法重载下

奖励园豆:5
日暮青色 | 菜鸟二级 |园豆:495 | 2018-05-15 09:04

大侠,某个方法是?

大da脸 | 园豆:73 (初学一级) | 2018-05-15 09:05

@板da凳: 早忘了,你看看呗,试下是哪个handler

CefContextMenuHandler?

具体的看源码呗,又不多

日暮青色 | 园豆:495 (菜鸟二级) | 2018-05-15 09:15

@日暮青色: https://www.cnblogs.com/chechen/p/6721462.html
如果按照你说的 这个貌似是,但具体应该写在哪里,能不能指点下?

大da脸 | 园豆:73 (初学一级) | 2018-05-15 09:17
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册