c# 何如在窗体内部 运行另外一个程序呢?
解决方案 »
- C#怎么下载远程服务器的文件并自己选择下载地址?
- 怎么在打包.net程序的时候把vfpodbc.msi驱动加进去 新手求教
- .net 操作Excel的问题
- 如何显示数据库中的多个image图片?使用什么控件?能看到吗?
- 不太明白如何去自动编号
- 请教Infragistics的WinGrid控件关于MulitColumn_DropDown
- 求救!win2003 server下开发的程序,win98 下出现错误。
- 困难问题--如何在visual C#中为listBox控件绘制背景
- 高分求c#中用oledbConnection连接vfp的.dbf数据库的连接字符串!!!!!
- 怎样在子窗口调用父窗口的事件处理程序?急救!!?
- 怎么将2005的数据库转化为2000可用的数据库呢?
- 判断dataset中是否包含某个值
首先要启动那个程序,获得其主窗体的句柄(WindowsAPI)。。
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.FileName = ???
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WorkingDirectory = ???;
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();类似的例子是调用一个控制台程序的
相当于你的外部程序作为一个子窗体吧?
DllImport("user32.dll", CharSet = CharSet.Auto)]
public extern static IntPtr SetParent(IntPtr hChild, IntPtr hParent);