我有自己的winforms表单,修改后ProcessCmdKey
:
private class MyForm : Form
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == (Keys.Escape))
{
this.BeginInvoke((MethodInvoker)delegate { this.Close(); });
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
在这个表格上,我有一个面板:
this._panel.BorderStyle = System.Windows.Forms.BorderStyle.None;
this._form.Controls.Add(this._panel);
this._panel.Parent = this._form;
this._panel.Size = this._form.Size;
在这个面板上,我有cef浏览器控制:
this._Chrome = new Xilium.CefGlue.WindowsForms.CefWebBrowser();
this._Chrome.StartUrl = "google.ru";
this._Chrome.Parent = this._panel;
this._Chrome.Dock = DockStyle.Fill;
this._Chrome.BringToFront();
1. 为什么ESCAPE键不起作用?
2. 如何在 CefWebBrowser 弹出菜单中禁用并禁用跟随链接?