Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I BINDEVENT() this?
Message
De
15/02/2006 07:31:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01096350
Message ID:
01096438
Vues:
17
I have an active X control I would like to disable when the 'oWord' reference is created (VARTYPE=[O]) and enabled when it is released (VARTYPE=[X]).

You can't use BINDEVENT(), but you can use EVENTHANDLER().

You need to implement Word's applicationEvents2 interface in your Word Handler class and use AddObject to add your handler to the form. That way, in the handler's ApplicationEvents2_Quit method, you can do 2 things:

1. Set the form's refrence to Word to .NULL.
2. Refer to "This.Parent" to refer to the form and enable the activeX control or otherwise refresh its controls.

As Naomi suggested, you may find the white papaer and code samples on my web site helpful.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform