BUG: DocumentComplete Does Not Fire When WebBrowser Is Not Visible (259935)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
- Microsoft Internet Explorer (Programming) 4.01 SP1
- Microsoft Internet Explorer (Programming) 4.01 SP2
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
- Microsoft Internet Explorer (Programming) 5.5
This article was previously published under Q259935 SYMPTOMS
When its Visible property is set to "False", the WebBrowser control (Shdocvw.dll) does not fire the DocumentComplete event and a document does not reach READYSTATE_COMPLETE state.
RESOLUTION
The best workaround for applications that rely on a hidden WebBrowser control is for you to position the control so that it draws its user interface off its container window. To do this, set the Left property of the control equal to the negative of its Width property. In multimonitor scenarios, negative values can be valid screen coordinates, so the Left property value must be set to coordinates that are outside the values returned by calling the EnumDisplayMonitors() method.
Alternately, if the WebBrowser user interface is not needed, the WinInet APIs can provide much of the same functionality.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbBug kbWebBrowser KB259935 |
---|
|