[System.ComponentModel.ToolboxItem(true)]
public class AxChartSpace : System.Windows.Forms.AxHost {
...
}
电子表格组件
[System.ComponentModel.ToolboxItem(true)]
public class AxSpreadsheet : System.Windows.Forms.AxHost {
...
}
数据透视表组件
[System.ComponentModel.ToolboxItem(true)]
public class AxPivotTable : System.Windows.Forms.AxHost {
...
}
5.
将事件类标记为 ClassInterfaceType.None,如下面的示例所示:
图表组件
[System.Runtime.InteropServices.ClassInterface(
System.Runtime.InteropServices.ClassInterfaceType.None)]
public class AxChartSpaceEventMulticaster : OWC11.IChartEvents {
...
}
电子表格组件
[System.Runtime.InteropServices.ClassInterface(
System.Runtime.InteropServices.ClassInterfaceType.None)]
public class AxSpreadsheetEventMulticaster : OWC11.ISpreadsheetEventSink {
...
}
数据透视表组件
[System.Runtime.InteropServices.ClassInterface(
System.Runtime.InteropServices.ClassInterfaceType.None)]
public class AxPivotTableEventMulticaster : OWC11.IPivotControlEvents {
...
}