Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3225694
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:22:10+00:00 2026-05-17T16:22:10+00:00

I have the following code: private void button1_Click(object sender, EventArgs e) { Process process

  • 0

I have the following code:

 private void button1_Click(object sender, EventArgs e)
    {
        Process process = new Process();
        ProcessStartInfo processStartInfo = new ProcessStartInfo();

        processStartInfo.Arguments = "-i 1 -x";
        processStartInfo.CreateNoWindow = false;
        processStartInfo.FileName = @"F:\NET\WiresharkPortable\App\Wireshark\tshark.exe";
        processStartInfo.RedirectStandardOutput = true;
        processStartInfo.UseShellExecute = false;
        process.StartInfo = processStartInfo;
        process.Start();

        StreamReader streamReader = process.StandardOutput;
        textBox1.AppendText(streamReader.ReadToEnd() + "\r\n");
    }

I’m trying to redirect the output to my program. tshark is sniffer, so it works until was suspended. How to redirect data in real time? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:22:10+00:00Added an answer on May 17, 2026 at 4:22 pm

    You’re currently calling ReadToEnd, which will block to the end of the stream.

    You could either repeatedly call Read from a separate thread, or you could use the newer eventing approach, handling Process.OutputDataReceived for each line after calling BeginOutputReadLine. Don’t forget to marshal back to the UI thread before changing the textbox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: private void button1_Click(object sender, EventArgs e) { var answer
I am work with SharpPcap library. I have following code: private void button1_Click(object sender,
I have this piece of code in my Silverlight project: private void button1_Click(object sender,
I have the following code: private static void WriteStartupInfo() { Settings settings = Settings.Default;
I have the following code for a button click on a form: private void
I have the following code that I managed to come up with: private void
I have the following method in my code: private bool GenerateZipFile(List<FileInfo> filesToArchive, DateTime archiveDate)
With a listbox, I have the following code to extract the item selected: private
I have the following code: $bind = new COM(LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local); When I execute it from
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.