Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

registering .ocx files at runtime 1

Status
Not open for further replies.

CMcC

Programmer
Feb 5, 2002
196
US
(I posted in General area - believe it should be posted here)
Hi all- using VFP 7
Question about the MS - date/time picker.
I can run the datetime picker fine on 1 machine( that I have never registered an .ocx on), but have an error trying to run on another...
Here is error:

'0x80040154 Class not registered. Ole Object is being ignored. Record number 10'

Now, I have 70 machines that this object needs to work on.
Must I register this .ocx on all machines, or can I supply it with the executable and register at runtime?

Thanks in advance for all your help.
 
Hi Borislav -

Do I do this in my main.prg? and - If I understand right - does everyone that runs this must they have admin rights?

thanks
cmcc
 
Hi Dave-
I currently do not use the Install Shield Express because:

1. I can create an executable by building and executable and placing the .exe into the appropriate subdirectory with all the tables and Fox.dlls in place there...it's placed on a network drive.

I will play around with the install shield and see what I come up with.

Will return in a bit.
Thanks,
cmcc
 
Install shield wouldn't be of much use in that scenario.

I can run the datetime picker fine on 1 machine( that I have never registered an .ocx on), but have an error trying to run on another...
That's because it's installed/registered on your computer.

But rather than register the OCX every time the app is run, you could try to create the instance of the class and if it produces an error, then register it. Something like:

ON ERROR RUN/n3 regsvr32 fullpathtoOCX
oObject = CREATEOBJECT('someobject')
ON ERROR

Or, subclass the calendar control, then in your app add the subclass instead of the control itself.
Chances are, it's already installed on the other systems, VFP just can't find it becuase it's lookinf for the values used on your developement machine.

-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi Dave -
Actually I do use a subclass of the OleContol DateTime picker.

I will try to create an instance in my main and let you know.
You were right though, Install shield did not help.

thanks so much
cmcc
 
Hi Dave-
Seeing as how before the error, vfp popped up a window asking where the .ocx was located....
I ended up just placing the .ocx in the live directory where the executable and tables are located.
That did it.
Thanks for all your help..
cmcc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top