Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is my OLE container not visible?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Why is my OLE container not visible?
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978732
Message ID:
00978732
Views:
79
I am experimenting with OLE containers automating Excel. I have inserted code in the Init method of a simple form to perform this function. Here is the code that I have been using.
thisform.AddObject("oleXL", "OleControl", "Excel.Application.11")
WITH thisform.oleXL
	.left = 75
	.top = 75
	.width = 200
	.height = 100
	.visible = .T.
	wbk = .object.workbooks
ENDWITH
wbk.add
WITH thisform.oleXL.Object
*	.visible = .T.		; Makes Excel visible as separate application
	.cells(1,1).value = 7
ENDWITH
This all executes without error, however, neither the OleControl, nor the contained Excel workbook are visible. If I remove the comment on the third line from the bottom, I can seel Excel as a separate application.

If I insert a command button on the form and debug break on its click command, I can see that my OleControl is there and its visible property is .T. But, the ole container control is not visible.

Could someone explain why this is not visible?

Thanks,
Jim
Next
Reply
Map
View

Click here to load this message in the networking platform