Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_webbrowser, Navigate and READ EVENTS
Message
 
 
À
22/09/2009 16:11:32
Howard Brown
Howard J. Brown Consulting Services Inc.
North Kingstown, Rhode Island, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 2000 SP4
Network:
Windows 2008 Server
Database:
Visual FoxPro
Divers
Thread ID:
01425655
Message ID:
01425674
Vues:
52
>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-form

in particular
* Load PDF
		WAIT WINDOW NOWAIT "Loading PDF ..."
		Thisform.oWB.OBJECT.Navigate2(Thisform.cPdfFileName)
		* Wait for PDF to load
		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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform