General information
Category:
ActiveX controls in 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...
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only