I am currently using an application that plays ppt and performs flash control in WebBrowser Control.
In WebBrowser, I can hide the context menu with
this.IsWebBrowserContextMenuEnabled = false;
and capture the key event using
this.PreviewKeyDown += new PreviewKeyDownEventHandler(IWebBrowser_PreviewKeyDown);
but when playing ppt , both the context menu and the keystroke events do not work, that is, I see the context menu and arrow to make ppt change the slide.
Again, during flash playback, the context menu is displayed, and I can handle the key event. is there any other setting for it, is the same for any ( HTML , ppt , Flash , PDF ) reproduced in webBrowser?
Edit: 1 Here is my existing code
class IWebBrowser : WebBrowser public IWebBrowser(RegionOptions options) { try { this.Width = 600; this.Height = 400; this.IsWebBrowserContextMenuEnabled = false; this.ScrollBarsEnabled = false; this.ScriptErrorsSuppressed = true; this.WebBrowserShortcutsEnabled = false; this.AllowNavigation = true; CreateContextMenu(); this.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(IWebBrowser_DocumentCompleted); this.PreviewKeyDown += new PreviewKeyDownEventHandler(IWebBrowser_PreviewKeyDown); } catch (Exception ex) { log.Error("IWebBrowser - ctor ", ex); } } private void CreateContextMenu() { ContextMenuStrip myContextMenu = new ContextMenuStrip(); this.ContextMenuStrip = myContextMenu; ToolStripMenuItem myFirstTooltip = new ToolStripMenuItem(); ToolStripMenuItem mySecondTooltip = new ToolStripMenuItem(); ToolStripMenuItem myThirdTooltip = new ToolStripMenuItem(); myFirstTooltip.Text = "Item One"; mySecondTooltip.Text = "Item Two"; myThirdTooltip.Text = "Item Three"; myContextMenu.Items.Add(myFirstTooltip); myContextMenu.Items.Add(mySecondTooltip); myContextMenu.Items.Add(myThirdTooltip); }
context menu Images for various controls reproduced in webbrowser
Show web page ..................

flash played in a web browser .................

ppt played webbrowser .....................

c # flash powerpoint webbrowser-control
madan Sep 17 '14 at 7:34 2014-09-17 07:34
source share