Edit a .Net 2.0 WebBrowser Control

G

Guest

Hello,
Is there any way to enable a .Net 2.0 WebBrowser control for edit mode?

Thank you,
Mark
 
H

Herfried K. Wagner [MVP]

Mark said:
Is there any way to enable a .Net 2.0 WebBrowser control for edit mode?

AFAIK no. You may want to use the IE5 DHTML Edit control (ActiveX control)
instead.
 
C

Charles Law

Hi Mark

In the DocumentComplete event:

<snippet>
Dim doc2 As mshtml.IHTMLDocument2

doc2 = DirectCast(WebBrowser1.Document.DomDocument,
mshtml.IHTMLDocument2)

doc2.designMode = "On"
</snippet>

HTH

Charles
 
R

Ryan Milligan

Another way would bew to use Reflection. See my c# example below:


System.Reflection.PropertyInfo pi =
this.webBrowser1.Document.DomDocument.GetType().GetProperty("designMode");

pi.SetValue(this.webBrowser1.Document.DomDocument, "On", null);


-Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top