using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace ActiveXDotNet
{
public interface AxMyControl
{
String UserText
{
set;
get;
}
}
/// <summary>
/// MyControl 的摘要说明.
/// </summary>
public class MyControl : System.Windows.Forms.UserControl, AxMyControl
{
/// <summary>
/// 必需的设计器变量.
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtUserText;
private String mStr_UserText;
public String UserText
{
get
{
return mStr_UserText;
}
set
{
mStr_UserText = value;
//修改组件的数值
txtUserText.Text = value;
}
}
public MyControl()
{
// 该调用是 Windows.Forms 窗体设计器所必需的.
InitializeComponent ( ) ;
// TODO: 在InitializeComponent 调用后添加任何初始化
}
/// <summary>
/// 清理所有正在使用的资源.
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
}
}
上面是小弟下的程序,在直接生成DLL出错,各们高手帮助改一下,谢谢
[此贴子已经被作者于2006-5-8 22:39:00编辑过]