首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

|M| 第二贴:500分Web调用WinForm有关问题 怎么在小弟我的ASP。NET2.0中的按钮点击执行WinForm程序

2012-06-19 
|M| 第二贴:500分Web调用WinForm问题 如何在我的ASP。NET2.0中的按钮点击执行WinForm程序http://community.

|M| 第二贴:500分Web调用WinForm问题 如何在我的ASP。NET2.0中的按钮点击执行WinForm程序
http://community.csdn.net/Expert/topic/5517/5517325.xml?temp=.8740045

注册表中

HKEY_CLASSES_ROOT下加一个项

名称为你的程序名称:

然后在这个项下加一个   字串,名称为URL   Protocol

然后在这个项下添加

Shell/Open/Command三个项
command的默认值改成你的程序路径(含文件)   %1   %1是指参数.

上面是cpp2017(慕白兄)的
不明白的是:(含文件)   %1   %1是指参数.
那个默认值我的是:
F:\学习工具\PrintClient\PrintClient\PrintClient\bin\Debug\PrintClient.exe

然后在这个PrintClient中的Form1中有Button1有事件
namespace   PrintClient
{
        public   partial   class   Form1   :   Form
        {
                public   Form1()
                {
                        InitializeComponent();
                }

                private   void   button1_Click(object   sender,   EventArgs   e)
                {
                        MessageBox.Show( "OK ");
                }
        }
}
然后WEB中有Default.aspx   有
public   partial   class   _Default   :   System.Web.UI.Page  
{
        protected   void   Page_Load(object   sender,   EventArgs   e)
        {

        }
        protected   void   Button1_Click(object   sender,   EventArgs   e)
        {
                  //点击这里调用WinForm   Button   事件
        }
}


[解决办法]
这也有可能吗?
[解决办法]
进来学习
[解决办法]
学习学习!
[解决办法]

[解决办法]
在前台调用:
window.open( "程序名称:参数 ");

热点排行