tags:

views:

30

answers:

2

this is the code I am using:

tabPage1.Controls.Add(AXViewer1);

where AXViewer1 is a third party ActiveX contorl (non .NET) that I want to add it to the my tab page.

Is it wrong to it the way I did ? since it has not added it to the tab page with that code.

A: 

Your ActiveX control probably cannot be reparented at runtime.

You need to create a new instance of the class at runtime by writing new AXViewer().

SLaks
A: 

Try setting the Visible property to True. Also try calling the CreateHandle method.

If none of this works, you are best off contacting the developer of the ActiveX control for support.

logicnp