Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shell.explorer.2 create document from variable
Message
From
26/06/2018 19:17:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Shell.explorer.2 create document from variable
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01660900
Message ID:
01660900
Views:
651
Hi All,

Currently I'm creating a HTML-editbox that uses the shell.explorer.2 webbrowser. The html-formatted texts are in a memo field. Suppose the object reference is oleControl1. I could start with such a text by writing it to a file first and then use oleControl1.NAVIGATE( "some file" ) or using a URL as parameter, like in my example.

I have tried to find the way to fill the editbox with the contents of a variable (the memo field). Esp. INNERHTML and OUTERHTML had my attention. But sofar I fail unless I first use NAVIGATE(). The problem is that, without navigate(), the DOCUMENT object is not created. And INNERHTML and OUTERHTML are sub-properties of DOCUMENT.

I have also first declared NAVIGATE("about:blank"), thus creating an empty DOCUMENT. Is this the obliged way to go? Or is there another way to create the DOCUMENT object that does not require the use of NAVIGATE()?
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT olecontrol1 AS olecontrol WITH ;
		oleclass = "shell.explorer.2", ;
		Top = 0, ;
		Left = 0, ;
		Height = 100, ;
		Width = 100, ;
		Name = "Olecontrol1"


	PROCEDURE Init
		this.olecontrol1.navigate("https://www.google.nl/")
		this.resize()
	ENDPROC


	PROCEDURE Resize
		with this
			.olecontrol1.height = .height
			.olecontrol1.width = .width
		endwith
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Next
Reply
Map
View

Click here to load this message in the networking platform