Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual FoxPro 5.0 & OLE/ActiveX Problem.
Message
De
03/02/1999 10:43:29
Paul Frost
Instem Computer Systems Ltd
Stone, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Visual FoxPro 5.0 & OLE/ActiveX Problem.
Divers
Thread ID:
00183445
Message ID:
00183445
Vues:
85
I am having problems using OLE and ActiveX to display JPEG files, though the problem seems to be with any type of file. I have been following the example in the help & documentation from the original CD.

I have used the Form Wizard to create a form, on which I want to display various images which cannot be bound to a General field in a table. If have the following class defined in a library file :

DEFINE CLASS oleJPGObj AS OLEControl
OleClass="MSPhotoEd.3"
DocumentFile="Kes.jpg"
ENDDEFINE

If I try to create an object using :
MyForm.AddObject( "oleobj1", "oleJPGObj" )
then the Add OLE Container dialogue is displayed as if I were using the Form Wizard to add the object.

If I add the object using :
MyForm.AddObject( "oleobj1", "oleJPGObj", "MSPhotoEd.3" )
then an icon is displayed showing the correct filename, double clicking launches MSPhoto Editor.

I have also tried to use the PicClip ActiveX component supplied, replacing "MSPhotEd.3" with "PicClip.PictureClip.1" & get exactly the same results, dialog displayed with 1st method & icon/launch of MSPhoto Editor with the 2nd.

Following the second method of adding the object, I have displayed the OLEClass & this is reported as "Package" in both instances rather than "MSPhotoEd.3" or "PicClip.PictureClip.1". If I use the form wizard to add objects of either type, everything works fine & the OLEClass is reported as expected.

Can anyone tell me what I am doing wrong (it's probably totally obvious). Why is packager being used rather than the specified OLE/ActiveX component ? The problem is similar if I use the "Excel.Sheet" example from the help pages. (Kes.jpg does exist & the components appear properly registered, no error messages are displayed)

With thanks (sorry its long winded)
Paul
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform