Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tree control and image list controls created in code
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00966947
Message ID:
00966962
Views:
7
Hi Jon.

A couple of points here:

I am trying to create a tree control programmatically. Here is a question:
I create the control
oTree=createobject('mscomctllib.treectrl.2')


While you can certainly create a TreeView like this, you are not going to be doing very much with it < s >. Wouldn't you rather add it to a form where it could actually be useful?
Thisform.AddObject( 'oTree', 'OLEControl', 'mscomctllib.treectrl.2' )
Thisform.oTree.Visible = .T.
You may also want to be on the lookout for a potential problem. I do not know if this one is still an issue, but I figured I would tip you off < s > :

BUG: License Error with ActiveX Control Added at Run-TimePSS ID Number: 192693

Article Last Modified on 7/29/1999

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Visual FoxPro for Windows 6.0

--------------------------------------------------------------------------------
This article was previously published under Q192693

SYMPTOMS

If you create an application that uses an ActiveX control that you add at run-time with syntax similar to the following:
THISFORM.AddObject("myctrl","olecontrol","mscomctllib.listviewctrl.2")

Then you build this application into an executable file, create a distribution with the Setup Wizard, and install your application on other computers, when you attempt to run code similar to the preceding code you receive an error like the following:
Program Error
OLE error code 0x80040112: Appropriate license for this class not found.

CAUSE

A distribution created with the Visual FoxPro Setup Wizard only allows a run-time license, while the AddObject method requires a design time license.
RESOLUTION

Add the control you want to use into a class that is saved in a Visual Class library or into a class created with the DEFINE CLASS command. Next, add an instance of the class at run-time instead of adding the control. Please see the MORE INFORMATION section for details.
Previous
Reply
Map
View

Click here to load this message in the networking platform