Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is an OCX Registered On My Machine?
Message
De
29/04/1999 19:55:10
 
 
À
29/04/1999 08:40:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00213266
Message ID:
00213709
Vues:
33
> Once a form fails to instantiate, I need to find out if the OCX is registered. If I understood your suggestion, it trapped for all instantiation failures, not just failure due to unregistered OCX.

Why did you understand it in this way? :)

The key to the problem is to verify that all needed OCXs are registered BEFORE trying to instantiate the form, not AFTER. And this is what I said in that message. Ie:

1. Check that all needed OCXs are registered:
lbRegistered = .t.
ON ERROR lbRegistered = .f.
ox = CreateObject("AControl.AControl.1")
IF NOT lbRegistered
   *-- Register the AControl here
ENDIF
*-- Repeat the above sequence for all needed OCXs
ON ERROR
2. If all OCXs are now registered, instantiate your form

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform