S
Sam
I am trying to create a webbrowser object that will a) not respond to clicks
on links, but b) will allow me to programatically navigate via the URL
property or Navigate() method.
I have tried to set AllowNavigation to false, but this restricts all
navigation, even by the methods and property.
I have also tried to use a boolean variable to indicate whether the
navigation request is "allowed" and cancel it in a Navigating event handler,
but I'm not sure where to reset the variable to not allow further
navigation. My first attempt was to do this in the DocumentCompleted event
handler, but I get multiple DocumentCompleted events on same web pages, so
if I clear the variable on the first DocumentCompleted, the further
navigations are cancelled... If I had a way to know when an "entire" page
was loaded, that might work, but I haven't found that event yet.
Is there a way to trap the mouse events within the webbrowser? Is there a
way to block them (I've thought of a transparent panel sitting in front of
the browser (not in front of the scroll bars, though!), but the transparency
doesn't seem to accomplish this.
Any ideas of how I can accomplish this?
Thanks in advance for any help you can provide!
on links, but b) will allow me to programatically navigate via the URL
property or Navigate() method.
I have tried to set AllowNavigation to false, but this restricts all
navigation, even by the methods and property.
I have also tried to use a boolean variable to indicate whether the
navigation request is "allowed" and cancel it in a Navigating event handler,
but I'm not sure where to reset the variable to not allow further
navigation. My first attempt was to do this in the DocumentCompleted event
handler, but I get multiple DocumentCompleted events on same web pages, so
if I clear the variable on the first DocumentCompleted, the further
navigations are cancelled... If I had a way to know when an "entire" page
was loaded, that might work, but I haven't found that event yet.
Is there a way to trap the mouse events within the webbrowser? Is there a
way to block them (I've thought of a transparent panel sitting in front of
the browser (not in front of the scroll bars, though!), but the transparency
doesn't seem to accomplish this.
Any ideas of how I can accomplish this?
Thanks in advance for any help you can provide!