请问VB.NET的exe是否可以嵌入到WEB页面上运行 本人用VB.NET开发了exe程序属于C/S框架的,但目前为了满足客户的需要要改成B/S的形式显示,就是直接将程序嵌入到WEB页面让用户浏览,不知道那位大侠知道是否可行啊,以前从未尝试过,如果可行的话,用什么方式可以实现!谢谢了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该是可以的,但没亲自弄过,建议楼主看些.net互操作方面的书籍,给一个小例子先准备下C++程序:#include <stdio.h>#include <iostream>int main(){ printf("hi"); int v1,v2; std::cin>>v1; v2=v1*2; std::cout<<v2<<std::endl;} 用C#调用:大气象 using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Diagnostics;public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { Bind(); } private void Bind() { Process p = new Process(); p.StartInfo.FileName = @"F:\code\cpp\FirstCmd\debug\FirstCmd.exe"; //p.StartInfo.Arguments = ""; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.CreateNoWindow = false; p.Start(); // p.StandardInput.WriteLine("2"); string output = p.StandardOutput.ReadToEnd(); Response.Write(output); //if (p.HasExited) // p.Kill(); }} 我刚试了下,可以运行程序起来,但是没有像web的一些插件一样在web上面显示。还是很感谢楼上的! 做成activeX控件但客户端都要 装.net framwork 不是屏蔽掉了,就像是一个下载到本地的程序一样运行了!不是在web页面上显示程序页面![Quote=引用 5 楼 hongdi 的回复:]做成activeX控件但客户端都要 装.net framwork如果是这样的话那上传下载就可以实现了就没有WEB的意义,我想实现的效果和WEB一样,不需要安装什么东西,像浏览网站一样,不知道用什么方式可以实现。 运行是可以的,但不可能呈现在web界面上 需要在客户端安装.net framwork吗? 无效报表文件路径 问题 URL重写的问题 请问 datagrid 如何实现 单元格的内容 超过 单元格单行 的宽度时 将 单元格超出的内容 用 "..." 显示 ???? 急!!!!!!! 在移动form里的list控件数据绑定事件里怎么添加wml标记啊? 为什么不能写入事件日志? 有关BBS图形界面的问题 asp.net 上传问题,搞不懂??高手进来给看看,分不够再加! 如何定义一个动态的CSS,根据屏幕分辨率变化 如何获取浏览器的前进后退 请问怎么样才能在asp.net里发送邮件 为什么得到的不是XML,而是一堆乱码? rtf
先准备下C++程序:
#include <stdio.h>
#include <iostream>
int main()
{
printf("hi");
int v1,v2;
std::cin>>v1;
v2=v1*2;
std::cout<<v2<<std::endl;
}
用C#调用:大气象 using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;using System.Diagnostics;public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Bind();
}
private void Bind()
{
Process p = new Process();
p.StartInfo.FileName = @"F:\code\cpp\FirstCmd\debug\FirstCmd.exe";
//p.StartInfo.Arguments = "";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = false;
p.Start();
//
p.StandardInput.WriteLine("2");
string output = p.StandardOutput.ReadToEnd();
Response.Write(output);
//if (p.HasExited)
// p.Kill();
}
}
但客户端都要 装.net framwork
做成activeX控件
但客户端都要 装.net framwork
如果是这样的话那上传下载就可以实现了就没有WEB的意义,我想实现的效果和WEB一样,不需要安装什么东西,像浏览网站一样,不知道用什么方式可以实现。