本文出自:http://www.cnblogs.com/margiex/archive/2007/05/08/739336.html
首先创建DLL库,代码如下:
【转载】使用C#创建ActiveX控件(译文)using System;
【转载】使用C#创建ActiveX控件(译文)
using System.Runtime.InteropServices;
【转载】使用C#创建ActiveX控件(译文)
namespace ANamespace 
将上面的代码保存为AClass.cs,然后编译: csc /t:library AClass.cs
将得到一个AClass.dll,然后注册:regasm AClass.dll /tlb /codebase
最后创建一个HTML测试网页,内容如下:
【转载】使用C#创建ActiveX控件(译文)<html>
【转载】使用C#创建ActiveX控件(译文)
<head>

相关文章: