using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;
namespace EzoneDOSApp
{
///
/// Form1 的摘要说明。
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox txtCmd;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.RichTextBox rtbResult;
///
/// 必需的设计器变量。
///
private System.ComponentModel.Container components = null;
private Process ProcessCmdObject;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
ProcessCmdObject=new Process();
ProcessCmdObject.StartInfo.FileName="cmd.exe";
ProcessCmdObject.StartInfo.UseShellExecute=false;
ProcessCmdObject.StartInfo.RedirectStandardInput=true;
ProcessCmdObject.StartInfo.RedirectStandardOutput=true;
ProcessCmdObject.StartInfo.RedirectStandardError=true;
ProcessCmdObject.StartInfo.CreateNoWindow=true;
ProcessCmdObject.Start();
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;
namespace EzoneDOSApp
{
///
/// Form1 的摘要说明。
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox txtCmd;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.RichTextBox rtbResult;
///
/// 必需的设计器变量。
///
private System.ComponentModel.Container components = null;
private Process ProcessCmdObject;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
ProcessCmdObject=new Process();
ProcessCmdObject.StartInfo.FileName="cmd.exe";
ProcessCmdObject.StartInfo.UseShellExecute=false;
ProcessCmdObject.StartInfo.RedirectStandardInput=true;
ProcessCmdObject.StartInfo.RedirectStandardOutput=true;
ProcessCmdObject.StartInfo.RedirectStandardError=true;
ProcessCmdObject.StartInfo.CreateNoWindow=true;
ProcessCmdObject.Start();
}