M
Martijn Boven
I created a activex control in c# (vs 2005)
--------------------------------------------
[Guid("41D7A3C7-B891-4379-BE33-5195A2CFF913"), ComVisible(true)]
public partial class ActiveTest : UserControl
{
public ActiveTest()
{
InitializeComponent();
}
}
--------------------------------------------
I created a axhost derived class to load it:
-----------------------------------------------
public class AxWindows : AxHost
{
public AxWindows()
: base("41D7A3C7-B891-4379-BE33-5195A2CFF913")
{
}
}
------------------------------------------------
When I load it on a form like this:
------------------------------------------------
AxWin.AxWindows ax = new AxWin.AxWindows();
this.Controls.Add(ax);
------------------------------------------------
It works just fine until I close the form. I get the exception:
{"The object's type must be __ComObject or derived from
__ComObject.\r\nParameter name: o"}
Does someone know what the problem is?
--------------------------------------------
[Guid("41D7A3C7-B891-4379-BE33-5195A2CFF913"), ComVisible(true)]
public partial class ActiveTest : UserControl
{
public ActiveTest()
{
InitializeComponent();
}
}
--------------------------------------------
I created a axhost derived class to load it:
-----------------------------------------------
public class AxWindows : AxHost
{
public AxWindows()
: base("41D7A3C7-B891-4379-BE33-5195A2CFF913")
{
}
}
------------------------------------------------
When I load it on a form like this:
------------------------------------------------
AxWin.AxWindows ax = new AxWin.AxWindows();
this.Controls.Add(ax);
------------------------------------------------
It works just fine until I close the form. I get the exception:
{"The object's type must be __ComObject or derived from
__ComObject.\r\nParameter name: o"}
Does someone know what the problem is?