Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a procedure to an ActiveX control
Message
 
 
À
29/06/2000 09:27:27
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00386187
Message ID:
00386425
Vues:
17
Hi Jon,
First off, I want to thank for pointing out something new to me. I didn't know you could specify the syntax for class definitions in that way.

As for your question, the method is definitely running as a result of the control instantiating and not the form. To test this, add the NOINIT keyword to the end of the ADD OBJECT Manager line of code. This will tell VFP to add the new object but not run its Init. Since the Olecontrol's Init doesn't run, your Manager.Init code doesn't run proving it is linked to the object.

Thanks.

>Hi Larry,
> Thanks for the reply, although it wasnt what I hoped to hear.
>
>>No it doesn't. Add the Init method under the OleManager class definition.
>
> According to the example under the DEFINE CLASS command in the help file, anything I add under the OleManager class definition is added to the OLE Container unless it is prefaced with the .Object clause, and I couldnt figure out how to create a procedure using the .Object clause.
>
>>Most likely, the Manager.Init line of code will throw an error.
>
> The Manager.Init line doesnt throw an error and in fact, executes when the object initializes. But is there a way to determine if the procedure is executing for the OLE Container or the ActiveX control?
>
>Jon
>
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform