Yimin
winform代码中
private void webView_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //播放器Flash添加右键菜单 HtmlElement bfq = webView.Document.GetElementById("CuPlayer"); if (bfq!=null) { bfq.MouseDown += new HtmlElementEventHandler(bfq_MouseDown); } } void bfq_MouseDown(object sender, HtmlElementEventArgs e) { if (e.MouseButtonsPressed==MouseButtons.Right) { cmsControl.Show(e.MousePosition);//弹出右键菜单 return; } }