Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Webbrowser control vs automation IE
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00963181
Message ID:
00963275
Views:
7
>Hi Mike and John,
>
>Thanks for
>Indeed the problem is that the object was not rendered yet.The code that I used to check this was :
>
>DO WHILE THISFORM.oWebBrowser.busy()
>	DOEVENTS
>ENDDO 	
>
>
>Seemingly this code doesn't work. Instead I use John's code now that checks if the object exists and works fine now.
>
>I don't understand why the above code doesn't work. It work fine using OLE automation.
>
>Could someone explain this to me.
>
>Thank you.
>
>Zakaria al Azhar

You can actually use the readystate property too. There are two of those, one on the webbrowser and one on the document. The webbrowser returns a character and the document returns a numeric.
owebbrowser.readystate<>'complete'
owebbrowser.document.readystate<>4 && complete

As for your code not working, it's because you are referencing the web browser control, not the document which is another level down.

John
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform