Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Object from ActiveX
Message
De
05/02/1999 12:18:59
 
 
À
05/02/1999 09:05:00
Paul Frost
Instem Computer Systems Ltd
Stone, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00183418
Message ID:
00184424
Vues:
16
Thanks for your response
I think I got it.. last nite

>As far as I understand it CREATEOBJECT creates an independant object, whereas AddObject adds a new object to the current container, it is not necessary to create the object & then add it.
>
>I have used a sequence similar to the follwoing to generate a form with an object :
>
>NewForm = CREATEOBJECT( "Form" ) && creates the form
>NewForm.AddObject( "NewObj", "MyClass" )
>NewForm.NewObj.Name = "Name"
>NewForm.Show()
>
>The CREATEOBJECT creates the form itself, AddObject is used to put objects onto the form.
>
>If you want the object to be 'attached' to the form, you would only use the AddObject method. Maybe the error is generated because you already have an object assigned to var & then assigning a new object to it.
>
>I would also be concerned about creating objects with the same name as the class (add object oleMessage1 as oleMessage1), I would use different names, though maybe this is because of my background in C/Pascal.etc.
>
>---------------
>(PS I've used FoxPro 2.x quite a lot & I'm moderately new to VFP5.0, so I may be wrong here, if anyone wants to tell me so, feel free, I'm still learning too.)
>
>Hope it helps,
>Paul
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform