Mayayana
3/6/2012 2:25:00 PM
| Is there some event that the users has control on (such as double
| click, Mouse_down...) that will fire some event for a visible
| webbrowser on a form?
|
Generally you'd want to use the Document. The IE
DOM is available. So there's click, right-click, etc.
but they're registering through the current Document.
The WB is basically the same as IE. You'd be interested
in events like DocumentComplete, and maybe window
details, but the person is never actually relating to the
WB. They're relating to the document in it.
Unfortunately, Microsoft has drastically damaged the
DOM in later versions of WB/IE. Since they introduced
"quirks mode" rendering there are actually two possible
DOMs. One is the old type. The newer one is more
standards-compliant. Which one is in effect depends on
whether a DOCTYPE tag or MS-specific META tags let
IE know that the page is non-quirks. The damage is that
the two DOMs are mutually exclusive. That may not
apply directly to events. I'm not sure. But it's something
you need to be aware of if you're working with the
DOM. Here's a typical example of what is sometimes
required to use the DOM now:
If WB.document.compatMode = "CSS1Compat" Then
MsgBox WB.document.documentElement.innerHTML
Else
MsgBox WB.document.body.innerHTML
End If
Notice how you can test it with CompatMode? They
broke that too!
"The IHTMLDocument5::compatMode property is deprecated in Internet Explorer
8 in favor of the IHTMLDocument6::documentMode property."
I do all web design with no DOCTYPE tag, which gives
me a very consistent behavior across all versions of IE.
But if you're not controlling the webpage then you have
to be aware of "document mode", and also of the various
broken compatibility items that MS introduces in *every*
version of IE.