正在阅读:在.NET程序中使用PIPE(管道技术)在.NET程序中使用PIPE(管道技术)

2004-02-14 09:34 出处:PConline 作者:夏桅/CSDN 责任编辑:linjixiong

  [代码]
  using System;
  using System.Diagnostics;
  using System.Drawing;
  using System.Collections;
  using System.ComponentModel;
  using System.Threading;
  using System.Windows.Forms;

  namespace Sunmast.Sample.Pipe
  {
   public class Sample : System.Windows.Forms.Form
   {
    private Process p;

    private System.Windows.Forms.RichTextBox tbResult;
    private System.Windows.Forms.Button btnExit;
    private System.Windows.Forms.Button btnRefresh;

    private System.ComponentModel.Container components = null;

    public Sample()
    {
   InitializeComponent();
   Thread t = new Thread(new ThreadStart(Run));
   tbResult.Text = "Processing...";
   t.Start();
  }

  private void Run()
  {
   p = new Process();
   p.StartInfo.FileName = "cmd.exe";

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品