>>Now, that my control has defined an object property, I am now trying to assign an object to it from Visual FoxPro.
>>
>>Assuming the control object name in Visual FoxPro is loValidation and the name of the control object property is ParentObject, when trying to do the following command, I get a Member not found.
>>
>>loValidation.ParentObject=myobjectnamehere
>>
>>Why is it that I get Member not found when assigning an object to this property?
>
>What is the object that you are trying to set? I couldn't find a way to pass a Foxpro object to VB. If it's an object that you have in VB, and then are instantiating it in VFP, THEN, set it to the control, that should work.
Yes, this is an object from Visual FoxPro.
However, I succeeded to pass a Visual FoxPro object to the control a month ago when I was using the old version. That old version was working ok in program mode but not in visual mode. This is why I changed my Get/Set definition to allow the settings of this object.
Do you mean, that with the current setting I am having now I can't pass an object from the source environment anymore?
Here's the main code I have in my control regarding the settings of that object.
Private loParentObject As Object
Public Property Get ParentObject() As Object
Set ParentObject = loParentObject
End Property
Public Property Set ParentObject(ByVal loValue As Object)
Set loParentObject = loValue
PropertyChanged "ParentObject"
End Property
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "ParentObject", ParentObject
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Set ParentObject = PropBag.ReadProperty("ParentObject", Nothing)