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 8637817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:34:02+00:00 2026-06-12T10:34:02+00:00

my class start new process (Tshark) and start capturing, from the main form i

  • 0

my class start new process (Tshark) and start capturing, from the main form i am checking the class properties in order to update my GUI, sometimes the received packets rate i so high that my GUI stuck so i want the option to check whose properties every 1-2 second.
this is my progress change function who checking my class all the time and in this point i am update my GUi, how can i checking those properties every 2 seconds ?

Tshark tshark = new Tshark();

private void bgWSniffer_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
    tshark = e.UserState as Tshark;
    lblNumberOfReceivedPackets.Text = tshark._receivesPackets.ToString("#,##0");
    lblTrafficRate.Text = (tshark._bitsPerSecond * 0.000001).ToString("0.##") + " Mbit/sec" + " (" + tshark._bitsPerSecond.ToString("#,##0") + " Bits/sec" + ")";
    lblPacketsRate.Text = tshark._packetsPerSecond.ToString("#,##0") + " Packets/sec";
    lblStatus.Text = tshark._status;
    lblFileSize.Text = formatBytes(tshark._myFile.Length);
    tshark._myFile.Refresh();            
}
  • 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-06-12T10:34:03+00:00Added an answer on June 12, 2026 at 10:34 am

    Check if 2 seconds has passed since the last check. Here, I’m using a class member to tract that time.

        private DateTime _LastCheck = DateTime.MinValue;
    
        private private void bgWSniffer_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            if (_LastCheck.AddSeconds(2) <= DateTime.Now)
            {
                _LastCheck = DateTime.Now;
                // do the UI update.
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my application i am open Tshark process and start capturing and from my
i have application how open Tshark process and start capturing packet, this process create
In my application I am start process (Tshark) and start capturing, after I am
Typically you start a service like this Intent i = new Intent(context,MessageService.class); context.startService(i); but
If I start from an empty class (TestClass) in Netbeans and add the following
I'm attempting to start a process from a piece of code but I want
I want to change a Form control property from a process thread event fire
Each time CurlFile() is called it creates a new object from the ProcessObject class.
Here is my method that starts a process: public class Tshark { public int
I start a Process and want to get the process output in order to

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.