How to cancel user-clicks in AxWebBrowser

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

Guest

Hi,

I am trying to present HTML in the AxWebBrowser control, but I want to
cancel the even of user-clicks, since I don't want to user to navigate any
further than the presented page. Any ideas?
 
OS said:
Hi,

I am trying to present HTML in the AxWebBrowser control, but I want to
cancel the even of user-clicks, since I don't want to user to navigate any
further than the presented page. Any ideas?
 
Hi

How are you able to browse (except using links on a page) in that control
when you did not set yourself on a form a button and than use commands as
navigateforward and backward or/and set an urlbox on that form, which does
the navigate command.

Cor
 
I am loading HTML into a document object:

Here is the code:

TextReader tr = new StreamReader("C:\\html.txt");
string file = tr.ReadToEnd();
object empty = System.Reflection.Missing.Value;
axWebBrowser1.Navigate("about:blank", ref empty, ref empty, ref empty, ref
empty);
mshtml.IHTMLDocument2 doc = axWebBrowser1.Document as mshtml.IHTMLDocument2;
doc.writeln(file);
doc.clear();
doc.close();

But now, after the document is loaded, I don't want to allow the user to
click on the links.
 
OS,

Than why do you than before that you add them to the page removing the hrefs
from that what in fact is a string.

Just my thought,

Cor
 
Back
Top