Hey Folks,
I have the below code setup to display my own context menu for the WebBrowser1 control. However, I sorta ran into a snag since my main web page has an Iframe. The contextmenu works fine on the index page itself but if i right click in the iframe window it doesn't keep the contextmenu. I've provided the below code so you can see.
Any help would be appreciated, thanks.Code:Option Explicit Public WithEvents HTML As HTMLDocument Private Function HTML_oncontextmenu() As Boolean HTML_oncontextmenu = False PopupMenu mnuContext '<---Check the mnu to your own menu name End Function Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) Set HTML = WebBrowser1.document End Sub Private Sub Form_Unload(Cancel As Integer) Set HTML = Nothing End Sub
n3m.




Reply With Quote