I'm having quite some trouble with the WebBrowser Document Completed event. I moderate some forums and I made a little tool to send PMs to the other moderators for me.
My code is this :
If sendMsg = True Then
Me.wbMessenger.Document.GetElementsById("subject").InnerText = Me.txtMsgSub.Text
Me.wbMessenger.Document.GetElementsById("message").InnerText = Me.txtMsgMsg.Text
Me.wbMessenger.Navigate("javascript:document.getElementsById('submit').click()")
sendMsg = False
This code is on the wbMessenger's Document Completed event.
Whilst I was stepping through my code I noticed that the event was getting fired before the web browser's document had actually completed loading.
Can someone please help?
-
-
Have you already taken a look at this KB Article ?
In other words, are you already taking the steps they illustrate to make sure the page is indeed completed loading (checking an IDispatch* against the WebBrowser Object)?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.