件,这就是产生的组件.
以下是经过上述步骤产生的MyControl.cs的全部代码:
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 ;
}
}
///
/// MyControl 的摘要说明.
/// public class MyControl : System.Windows.Forms.UserControl , AxMyControl
{
///
/// 必需的设计器变量.
/// 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 窗体设计器所必需的.
Initialize