by IDEAL Software Support » Tue Nov 23, 2004 4:21 pm
Hello Manjit,
I use VFP7 also, but I always drop the control on the form, works good for
me...
I do have code that will register an OCX file, give it a gry and see if it
works for you.
I think the problem is that the OCX has to be licensed from the machine
where it is developed.
You can create a class with the VPE OLEcontrol object and the use the
createobject() from your class.
function RegisterOCX
* This function registers/unregisters an OCX/ActiveX control
*-- Parameters:
* tcFileName = the name of the file that contains
* the control(s), including the path.
*-- Returns:
* Logical TRUE if successful, FALSE otherwise.
*-- Call sample:
* llRegistered = RegisterOCX("c:\windows\system\comctl32.ocx",.T.)
LParameters tcFileName, tlOnOff
Local llSuccess
If File(tcFileName)
If tlOnOff
Declare Integer DllRegisterServer In (tcFileName) As
__DllRegisterServer__
*-- This function returns 0 if successful
Store __DllRegisterServer__() = 0 To llSuccess
Else
Declare Integer DllUnRegisterServer In (tcFileName) As
__DllUnRegisterServer__
*-- This function returns 0 if successful
Store __DllUnRegisterServer__() = 0 To llSuccess
Endif
Else
llSuccess = .F.
Endif
Return llSuccess
HTH,
Kent