Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Versioning of ActiveX and VFP Forms
Message
De
08/07/2002 08:04:21
 
 
À
30/06/2002 22:42:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00673762
Message ID:
00676062
Vues:
25
>I use ActiveX control ( namely FlyTreexPro from 9rays.com ) in my form.
>When control creators released a new version of it and I ran installation procedure resulting in OCX overwriting , my form started to complain "OLE error code 0x80040154 : Class not registered. OLE object is being ignored. Record number ..." My understanding was that all OCX upgrades should be transparent for form , it picks up the newer one automatically. At the same
>time I've got VB form for testing for which this upgrade didn't result in any problem. Funnily enough if I create a new form and include this upgraded version ( let's say 100 ) and then roll back OCX to version 93, I don't have any complaint either. My question is what may cause such a behaviour :
>1. Something strange in .scx/sct files ( if so where to search )
>2. Control creators missed something which is required when new version is released.
>3. We should expect such a behaviour with Foxpro forms and I need to include control again from toolbar and then paste methods saved in advance.
>
>Thank you
>Michael

It is because Visual FoxPro identifies ActiveX classes by their CLSID - it is stored together with binary copy of the object interface in th OLE field of the SCX table. So what you can do:
1. You can try to edit the CLSID in the SCX table so that it matches this of the new version of the ActiveX. Note that the CLSID is stored in UNICODE format near the end of the OLE field data.
2. You can open your form using Class browser get all your form code as class definition (see the class browser toolbar - there is View Class code button). Then you can create a VCX from the PRG class using the SaveAsClass method.
3. You can try to create a tool that reads the SCX table and locates the ActiveX object program code, than opens the form in form designer and after that adds automatically ActiveX object of the new version and writes the program code using the WriteMethod method of the form.

For more info about SCX structure use:
REPORT FORM (HOME()+"Tools\Filespec\60scx1.frx") preview
HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform