Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to trap if control is registered before open dialogu
Message
 
 
À
27/09/2000 16:06:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00421747
Message ID:
00421770
Vues:
18
April,
In the forms load event add code like the following:
lControlAvailable = .T.
on error lControlAvailable = .F.
oControl = CREATEOBJECT( "MSWinsock.WInsock.1" )
*- Restore default error handler.
*- Either release oControl yourself or let it go out of scope
*- at the end of this event.
You can then use lControlAvailabel to determine whether or not you need to register the control before the form appears.
Look at oleclass in properties for the class name.
Hope this helps,
Houston.

>Hi!
>We are trying to check if an active x control is registered on a form so that we can run regsvr32 if it is not and avoid any error messages for the user. We are able to see trap the error - but not until after the form has started to load and the open dialogue box has appeared. Does anyone know a good way to tell if a control is not registered without alerting the user? (This situation should be rare so we don't want to use any api functions to check for this everytime - it would be wastefule).
>
>Thanks!
censored.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform