Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding an instance of an ActiveX class at run-time
Message
De
31/10/2007 10:33:18
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Adding an instance of an ActiveX class at run-time
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01265383
Message ID:
01265383
Vues:
68
Not sure what it means to "...add an instance of the class at run-time instead of adding the control." The following is from http://support.microsoft.com/default.aspx?scid=kb;EN-US;192693 and is a resolution to a known issue with ActiveX controls in EXEs.
Add the control you want to use into a class that is saved in a Visual Class library or into a class 
created with the DEFINE CLASS command. Next, add an instance of the class at run-time instead of 
adding the control.
I'm currently using this to access the control:
DEFINE CLASS EMPS_Class AS SESSION OLEPUBLIC

	* Using the MSWinsck control for basic port communications
	IMPLEMENTS DMSWinsockControlEvents IN "c:\windows\system32\mswinsck.ocx"

	lGarbageCollected = .F.

	oSock = NULL


	**********************************************************
	PROCEDURE INIT

		* Create the port communication object
		THIS.oSock = CREATEOBJECT("MSWinsock.Winsock.1")

	ENDPROC
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform