调用控制台的问题。 System.Diagnostics.Process.Start("sn.exe","-k aa.snk");//说明 前一个选项是命令,后一个选项是参数,在参数中就可以使用文件名了,也就是你的saveFileDialog1.FileName 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://community.csdn.net/Expert/topic/3063/3063626.xml?temp=.7816126 是的hxhbluestar,可是需要先进入cdm呀,请说说winform下调用console控制台的应用。 System.Diagnostics.Process.Start就是启动一个进程如果你的程序是控制台的话,自动打开控制台如果是WinForm程序,就打开WinForm程序 用netstat命令取得网络连接:Process proc = new Process();ProcessStartInfo info = new ProcessStartInfo();info.CreateNoWindow=true;info.RedirectStandardOutput=true;info.UseShellExecute=false;info.FileName="netstat";info.Arguments=" -n";proc.StartInfo=info;proc.Start();StreamReader reader = proc.StandardOutput;string content = reader.ReadToEnd();reader.Close(); 具体说吧,winform下调用cmd并运行sn.exe 123.sn后返回。 Process proc = new Process();ProcessStartInfo info = new ProcessStartInfo();info.CreateNoWindow=true;info.RedirectStandardOutput=true;info.UseShellExecute=false;info.FileName="sn.exe";info.Arguments=" 1233.snk";proc.StartInfo=info;proc.Start();StreamReader reader = proc.StandardOutput;string content = reader.ReadToEnd();reader.Close(); 简易编译器http://vip.6to23.com/3some/program/asm16.rar 碰到了个没人知道的问题,创建项目出错 如何用C++代码 实现C#的扩展方法的功能 关于C#中调用进程释放的问题 SharpZipLib压缩后文件没有后缀名 List<T>的问题 AJAX,ASP.NET,C# 讨论群 急!C#中如何向sql中写入二进制流? 请问socket 里面都有那些事件啊??? 在js控制Textbox输入是一个大于0小于100的数怎么写(可以有小数点),怎么在Textbox调用这个 Web Service 问题 想做一个WINDOWS自带的资源管理器,C#中用什么控件或是类 怎么做 winform下调用cmd
如果你的程序是控制台的话,自动打开控制台
如果是WinForm程序,就打开WinForm程序
Process proc = new Process();
ProcessStartInfo info = new ProcessStartInfo();
info.CreateNoWindow=true;info.RedirectStandardOutput=true;
info.UseShellExecute=false;
info.FileName="netstat";
info.Arguments=" -n";
proc.StartInfo=info;proc.Start();
StreamReader reader = proc.StandardOutput;
string content = reader.ReadToEnd();
reader.Close();
ProcessStartInfo info = new ProcessStartInfo();
info.CreateNoWindow=true;info.RedirectStandardOutput=true;
info.UseShellExecute=false;
info.FileName="sn.exe";
info.Arguments=" 1233.snk";
proc.StartInfo=info;proc.Start();
StreamReader reader = proc.StandardOutput;
string content = reader.ReadToEnd();
reader.Close();