AmbientProperties: how to get it in my ActiveX control?

I make ActiveX control on VB.NET. Some "container application" loads itin runtime and interact with my control through certain "connection object".

Container application does provide this object as Ambient property.

In practice it looks like:


PublicClass MyControl
Inherits System.Windows.Forms.UserControl

PrivateWithEvents m_objConnObjectas ContainerApp.ConnObject

PrivateSub m_objConnObject_OnSomeEvent()Handles m_objConnObject.SomeEvent
' event processing

End Sub

' other m_objConnObject events handlers
End Class


Control needs to getm_objConnObject from container's ambient property, but I don't knowhow i can get it andin which method/event handler of control's class.

Thanks!

[1321 byte] By [Wrangler] at [2007-12-16]