Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible to feed html to Explorer ole rather than url?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00930769
Message ID:
00930771
Vues:
32
This message has been marked as the solution to the initial question of the thread.
>I'm building HTML code in VFP and stuffing it into a variable. I want to then display the HTML contained in my variable. I can do this right now by using strtofile() to write the string to file and then doing thisform.oleBrowser.Navigate("c:\temp\warn.htm").
>
>I was just wondering if there is a way to skip the whole writing to file thing and get the browser control to just display the HTML. Has anyone done this?

Hi Rodd,

Her's the code we use to show HTML from the form property in the Web Browser control. It sould work for IE also.
WITH Thisform.oWB
	.Navigate("about:blank")	
	lnStartSeconds = SECONDS()
	DO WHILE .ReadyState <> 4 ;
			AND (SECONDS()-lnStartSeconds <= 1 )
		DOEVENTS
	ENDDO	
	.Document.Open()
	.Document.Write(Thisform.cHTML)	
	.Document.Close()		
ENDWITH
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform