※※※※※一整天都没搞定这个小问题,快疯了,dll签名的问题※※※※※※ http://www.cnblogs.com/homer/archive/2005/03/07/97822.html#114445按照这个上述文章的做法,做了一个activex,发布时,不知道如何签名?哪位高人知道,指点一下了,100分献上。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 首先,我们建立一个windows安装项目,并将ActiveX控件的主输出添加到项目输出中。然后,改动ActiveX控件的主输出文件,将其Register属性改为vsdrpCOM. ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cptutorials/html/shared_names.htm这里是强命名。 有人知道吗?这是我的HTML文件:<body bgcolor='#00ffff'> <object id="Test1" classid="clsid:BED2FEEB-1C44-41DA-B538-6A8D002E7EB5" Width="600" Height="400" codebase="website\setup.exe"> </object> </body> 这是我的C#源文件:using System;using System.Collections;using System.ComponentModel;using System.Drawing;using System.Data;using System.Windows.Forms;using System.Runtime.InteropServices;namespace Test1{ [ClassInterface(ClassInterfaceType.AutoDual)] [Guid("BED2FEEB-1C44-41da-B538-6A8D002E7EB5")] public class StartApp : System.Windows.Forms.UserControl { private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Button button2; /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.Container components = null; public StartApp() { // 该调用是 Windows.Forms 窗体设计器所必需的。 InitializeComponent(); // TODO: 在 InitComponent 调用后添加任何初始化 } /// <summary> /// 清理所有正在使用的资源。 /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if( components != null ) components.Dispose(); } base.Dispose( disposing ); } #region 组件设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器 /// 修改此方法的内容。 /// </summary> private void InitializeComponent() { this.button1 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.button2 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(248, 168); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(72, 20); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.Click += new System.EventHandler(this.button1_Click); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(16, 16); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(280, 20); this.textBox1.TabIndex = 1; this.textBox1.Text = "textBox1"; // // button2 // this.button2.Location = new System.Drawing.Point(304, 16); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(24, 20); this.button2.TabIndex = 2; this.button2.Text = "..."; this.button2.Click += new System.EventHandler(this.button2_Click); // // StartApp // this.Controls.Add(this.button2); this.Controls.Add(this.textBox1); this.Controls.Add(this.button1); this.Name = "StartApp"; this.Size = new System.Drawing.Size(336, 208); this.ResumeLayout(false); } #endregion// private void button1_Click(object sender, System.EventArgs e) { System.Diagnostics.Process.Start(textBox1.Text); } private void button2_Click(object sender, System.EventArgs e) { OpenFileDialog fdlg = new OpenFileDialog(); fdlg.Title = "Select Application program"; if(fdlg.ShowDialog() == DialogResult.OK) { textBox1.Text = fdlg.FileName ; } } }}最后怎么发布啊,谁知道指点一下了??? LINQ方法里选择特定的某列 C#的问题。解决不了了,有点着急。谢谢 今天答辩,评委这几个问题搞不定啊啊啊啊! 关于VS2008的一个问题,大家帮帮忙 c# 调用VC dll指针问题 如何使用c#在excel查询出有 "A"或者有"B"内容的单元格? 急,急,急,oracle中如何获得当天不同时间段的所有数据? 水晶报表插入图片的问题 开发数据库接口 面试,求救各位大仙 关于TextBox只可以输入数字的问题 关于窗体加载的简单问题
这是我的HTML文件:
<body bgcolor='#00ffff'>
<object id="Test1"
classid="clsid:BED2FEEB-1C44-41DA-B538-6A8D002E7EB5" Width="600" Height="400" codebase="website\setup.exe">
</object>
</body> 这是我的C#源文件:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Runtime.InteropServices;namespace Test1
{ [ClassInterface(ClassInterfaceType.AutoDual)]
[Guid("BED2FEEB-1C44-41da-B538-6A8D002E7EB5")]
public class StartApp : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button2;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public StartApp()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent(); // TODO: 在 InitComponent 调用后添加任何初始化 } /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
} #region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(248, 168);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(72, 20);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(16, 16);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(280, 20);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "textBox1";
//
// button2
//
this.button2.Location = new System.Drawing.Point(304, 16);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(24, 20);
this.button2.TabIndex = 2;
this.button2.Text = "...";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// StartApp
//
this.Controls.Add(this.button2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.Name = "StartApp";
this.Size = new System.Drawing.Size(336, 208);
this.ResumeLayout(false); }
#endregion
// private void button1_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process.Start(textBox1.Text);
} private void button2_Click(object sender, System.EventArgs e)
{
OpenFileDialog fdlg = new OpenFileDialog();
fdlg.Title = "Select Application program";
if(fdlg.ShowDialog() == DialogResult.OK)
{
textBox1.Text = fdlg.FileName ;
}
}
}
}最后怎么发布啊,谁知道指点一下了???