Does C#, axWebBrowser, designMode and EventHandler work together?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I inserted a WebBrowser-Control in my c# program. Moreover I activated the designMode. My prorgam worked fine.
I was able to edit the site. I want to add my own context menu that is showed when the user press the right mous
button. I added this code

private void DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e

mshtml.HTMLDocument doc = (mshtml.HTMLDocument) this.axWebBrowser1.Document
doc.designMode="On"

mshtml.HTMLDocumentEvents2_Event iEvent = (mshtml.HTMLDocumentEvents2_Event) doc
iEvent.onmouseup += new mshtml.HTMLDocumentEvents2_onmouseupEventHandler(showcontextmenu)


private void showcontextmenu(IHTMLEventObj obj

...


After that I was not able to do anything with the editor, but my menu worked

Can somebody tell my how do I correct my code that the context menu and the editor worked

Thanks, Steffe
 
MSDN has a very poor answer..im using vb6 pro...can anyone tell me how to add the choice"Open in new tab" to the context menu thorugh code....preferably in such amanner that its removed when my form closes(forsafety) and added back when my form is reloaded?..ive been looking for a week now and have found no good answer

\My apologies for making this a reply...this website is acting screwy and wont let me choose the forum
 
Back
Top