BUG: DocumentComplete Does Not Fire When WebBrowser Is Not Visible
This article was previously published under Q259935 On This PageSYMPTOMS
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. MORE INFORMATIONSteps to Reproduce Behavior
REFERENCES
For additional information, please see the following MSDN Web Workshop sites: DocumentComplete Event http://msdn.microsoft.com/workshop/browser/webbrowser/reference/events/DocumentComplete.asp (http://msdn.microsoft.com/workshop/browser/webbrowser/reference/events/DocumentComplete.asp) Microsoft Win32 Internet Functions Reference http://msdn.microsoft.com/workshop/networking/wininet/reference/reference.asp (http://msdn.microsoft.com/workshop/networking/wininet/reference/reference.asp) APPLIES TO
| Article Translations
|

Back to the top
