Information générale
Catégorie:
Contrôles ActiveX en VFP
Can not remember where I got it, but here is Cetin Basoz' code:
?iCetinBasoz("Word.Application")
*---------------------
Procedure iCetinBasoz
lparameters tcClass
#DEFINE HKEY_CLASSES_ROOT -2147483648
#DEFINE ERROR_SUCCESS 0 && OK
DECLARE Integer RegOpenKey IN Win32API ;
Integer nHKey, String @cSubKey, Integer @nResult
DECLARE Integer RegCloseKey IN Win32API ;
Integer nHKey
local lnKey
lnKey = 0
llRetVal = ( RegOpenKey(HKEY_CLASSES_ROOT, tcClass, @lnKey) = ERROR_SUCCESS )
if llRetVal
RegCloseKey(lnKey)
endif
return llRetVal
>Hi all,
>
>I need to capture for the possibility that an ActiveX control was not loaded on a workstation (i.e. they did not do a necessary update), but I can't seem to trap for the OLE error returned when the form is opening. I've tried capturing in the form.load, form.error, control.init, control.error, etc. but nothing seems to work. All I need to do is just give them a friendlier message than the "OLE error...Class not registered". What am I missing?
>
>
>Thanks,
>
>- Brian
>
>VFP6 SP5
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement