R
runningdog
Hi,
I have a Windows Form Control that needs to interact with an object created by the project consuming the control. So I have exposed a Public property which I can set to the name of the object at design time.
eg.
Class MyControl
....
Private ObjectRef As lgeConnection.lgeConnection
<RefreshPropertiesAttribute(RefreshProperties.All), _
Description("Name of Object."), _
Category("Misc")> _
Public Property ObjectName() As MyObjectType
Get
Return ObjectRef
End Get
Set(ByVal Value As MyObjectType)
ObjectRef = Value
End Set
End Property
...
End Class
Question: Can I get the designer to find an instance of MyObjectType and set ObjectName at design time. There should always be one and only one instance of this class.
TIA
Steve
I have a Windows Form Control that needs to interact with an object created by the project consuming the control. So I have exposed a Public property which I can set to the name of the object at design time.
eg.
Class MyControl
....
Private ObjectRef As lgeConnection.lgeConnection
<RefreshPropertiesAttribute(RefreshProperties.All), _
Description("Name of Object."), _
Category("Misc")> _
Public Property ObjectName() As MyObjectType
Get
Return ObjectRef
End Get
Set(ByVal Value As MyObjectType)
ObjectRef = Value
End Set
End Property
...
End Class
Question: Can I get the designer to find an instance of MyObjectType and set ObjectName at design time. There should always be one and only one instance of this class.
TIA
Steve