Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is my OLE container not visible?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Why is my OLE container not visible?
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
00978732
Message ID:
00978732
Vues:
78
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform