Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview ActiveX
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00160596
Message ID:
00160639
Views:
23
>I have created a form using the treeview ActiveX control. I am getting an OLE object not registered when I run the compiled version of the application on a machine that does not have VFP installed on it. I expect that is due to the fact that VFP registers the control when you set it up from the menu under tools->options->controls. In addition, I am also getting the same error message when running the application on a third machine with VFP installed, and the only difference I can find is the dates on the files for the comctl.ocx being used.
>
>How do I correctly register the OLE?

You actually have two separate problems here - one is an install issue, and the other a registration issue.

The first issue - how are you putting the TreeView control on the user's system? I'd guess that you aren't using the Setup Wizard. VFP's Setup Wizard, if told to place ActiveX components in an install, will register them correctly when they're copied in place.

If you're not using an installer to put the app in place, or are trying to 'roll yer own', I'd recommend using Seup Wizard to create an install package for at least the VFP Runtime components and any ActiveX components your application will need. I've used this approach with installations that I've done using InstallShield Pro and the Windows Scripting Host to perform the installs; I simply include the VFP NetSetup as a part of my (CD-based) distribution in it's own directory, and then run the VFP Setup Wizard install from inside my main installation script (InstallShield's LaunchAppAndWait(), and the Wscript.Shell automation object's Run method with the WaitOnReturn parameter set to true will both run the Setup Wizard install and wait on its completion. and with a little playing, you can fire the Setup Wizard install script silently to hide that it's a separate component.)

The second issue = how to register the control, is a bit easier to address. there are several ways to do this. Once the control is on the user's system, you can run the Windows REGSVR32.EXE to register the .OCX for you from a command prompt, or internally from VFP with the RUN command. If you've associated REGSVR32 with the OCX and DLL file types in the Windows Explorer, simply double-clicking on it in Explorer will run REGSVR32 against it (you can create the association using Explorer if it isn't there already.) FInally, there are some simple API calls that are documented in the FAQ that can be used to fire self-registration of a .DLL or .OCX file from within a VFP application.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform