Information générale
Catégorie:
Contrôles ActiveX en VFP
Guillaume
I use the following code to avoid this problem (in main program):
*******************************
* Get the Windows\System folder
*******************************
declare long GetSystemDirectory in WIN32API string @, long
SYSTEMDIR = space(128)
LENGHT = GetSystemDirectory(@SYSTEMDIR, len(SYSTEMDIR))
SYSTEMDIR = upper(left(SYSTEMDIR, LENGHT))
***************************************************
* Check to see if MSCAL.OCX exists in system folder
***************************************************
if not file(SYSTEMDIR + "\MSCAL.OCX")
* Take action when MSCAL.OCX is not found, for example
* display a error message and quit
else
*********************************************************
* Check to see if REGSVR32.EXE exists in system folder
* We will use this program to register the .OCX component
*********************************************************
if !file(SYSTEMDIR + "\REGSVR32.EXE")
* Take action when REGSVR32.EXE is not found, for example
* display a error message and quit
else
****************************************
* Now we can register the .OCX component
****************************************
run /n REGSVR32.EXE SYSTEMDIR + "\MSCAL.OCX /s
endif
endif
Hope this helps...
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