Hi,
I'm trying to add a MapPoint ocx component to a radDockPanel at runtime.
I'm trying to add a MapPoint ocx component to a radDockPanel at runtime.
Me.pnMap = New Telerik.WinControls.Docking.DocumentPane
Dim oMap As New MapPoint.MappointControl
Me.pnMap.Controls.Add(oMap)
The following error occurs:
Unable to cast COM object of type 'MapPoint.MappointControlClass' to class type 'System.Windows.Forms.Control'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
If I embed the control from the toolbox at design time everything works fine, so could you please help me with this?
Regards,