Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winsock
Message
From
25/06/2002 08:30:06
Arlei Silva
Chevron Oronite Brasil Ltda.
Capuava, Brazil
 
 
To
24/06/2002 11:16:43
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00671654
Message ID:
00671951
Views:
15
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
Map
View

Click here to load this message in the networking platform