扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
组件设计器生成的代码#region 组件设计器生成的代码
/**//// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(296, 23);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(120, 56);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(320, 88);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// AbeenControl
//
this.Controls.Add(this.groupBox1);
this.Name = "AbeenControl";
this.Size = new System.Drawing.Size(328, 96);
this.Load += new System.EventHandler(this.AbeenControl_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void button1_Click(object sender, System.EventArgs e)
{
this.label1.Text="点击完成!";
}
private void AbeenControl_Load(object sender, System.EventArgs e)
{
}
}
}
2、web 页面调用Active组件
注意web页面调用时需要把Active的.dll放到web的虚拟要目录下。
<HTML>
<HEAD>
<title>TestActive</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="javascript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body >
<font face="arial" size="1">
<OBJECT id="MyControl1" name="MyControl1" classid="http://localhost/WebApplication1/ActiveXDotNet.dll#ActiveXDotNet.AbeenControl"
width="288" height="72" VIEWASTEXT>
</OBJECT>
</font>
<form id="frm" name="frm">
<input type="text" name="txt" value="请输入数据:" ID="Text1">
<input type="button" value="确定" onclick="doScript();" ID="Button1" NAME="Button1">
<script type="text/javascript">
function doScript()
{
MyControl1.LabelText=frm.txt.value;
}
</script>
</form>
</body>
</HTML>
http://www.cnblogs.com/abeen/archive/2006/12/13/590764.html
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者