Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping error when instantiating
Message
 
À
29/12/2011 13:49:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
01531892
Message ID:
01531895
Vues:
43
>Hi,
>
>I have an ActiveX that I added to a form (visually). Certain PCs that the system gets installed on will not have this ActiveX available. Is there a way to trap this?
>
>I know I could use a CREATEOBJECT to instantiate the ActiveX and wrap that in a TRY... END rather than put it visually on the form, but I need to put it visually so that I can add some code to the ActiveX's Events.

Frank,

If you are just using the visual ActiveX to put code in the events of it, it is not necessary, you can implement its interface methods in a FoxPro prg class and then in your form you instantiate this class in code. You can even kick start the process by opening the ActiveX control with FoxPro's Object Explorer (in the tools menu), expand the tree to see the "Interfaces" branch, expand it, found the interface you want to interact to, open an (empty) program (modify command [enter]) and then drag the interface into the prg editor. This will write all the events of the ActiveX and then you just need to put your code in it

HTH
Hugo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform