>I have placed Microsoft's _webbrowser control on a form. When I DO FORM formname, I successfully reach a URL using thisform._webbrowser41.navigate("
http://www.myurl.com/") and perform a file download. Then I click on a command button which has the TerminateRead property = .t. However when I return to the calling program, where the next command is READ EVENTS, the calling program "stalls" or seems to go into limbo, does not execute the code, the menu gives me the choice of Cancel or Suspend. Debugger is pointed to the READ EVENTS line but will not execute it. I have tested the command button and determined that it functions correctly when the webbrowser code isn't a factor. Help? TIA.
>Howie
Check code from
http://berezniker.com/content/pages/visual-foxpro/view-pdf-vfp-formin particular
WAIT WINDOW NOWAIT "Loading PDF ..."
Thisform.oWB.OBJECT.Navigate2(Thisform.cPdfFileName)
lnSeconds = SECONDS()
DO WHILE (Thisform.oWB.OBJECT.Busy OR Thisform.oWB.OBJECT.ReadyState <> 4) ;
AND (SECONDS() - lnSeconds) < This.nPdfLoadTimeout
DOEVENTS
ENDDO
WAIT CLEAR
E.g. you need to wait a bit after Navigate.
Also, what do you want with TerminateRead? Do you want to release the form instead? If yes, just call thisform.Release()
If it's not broken, fix it until it is.
My Blog