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

  • SEARCH
  • Home
  • 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 9077985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:30:31+00:00 2026-06-16T19:30:31+00:00

i build application who take all the files in my ListView (pcap files )and

  • 0

i build application who take all the files in my ListView (pcap files )and start to play all the packets.
what i want is that the currently file that play will mark and after this file finish the next file after will be marked and the focus will be all the time on the selected file (i dont want to manually acroll to see the file)
what i have now is that the first file marked and after it finish my application markes also the second and after the third together.

tis is my start button:

private void btnStart_Click(object sender, EventArgs e)
{
    string filePath = string.Empty;
    ThreadPool.QueueUserWorkItem(delegate
    {
        for (int i = 0; i < lvFiles.Items.Count; i++)
        {
            this.Invoke((MethodInvoker)delegate
            {                        
                lvFiles.EnsureVisible(i);
                lvFiles.Items[i].Selected = true;
                filePath = lvFiles.Items[i].Tag.ToString();
            });

            PcapFile pcapFile = new PcapFile();
            pcapFile.sendQueue(filePath, adapter);
        }
    });
}

lvFiles is my ListView, PcapFile is my class and pcapFile.sendQueue is the method who start the play.

  • 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-16T19:30:32+00:00Added an answer on June 16, 2026 at 7:30 pm

    You should call Select() on the listview for this. Also don’t forget to unselect current item before selecting next one.

        for (int i = 0; i < lvFiles.Items.Count; i++)
        {
            this.Invoke((MethodInvoker)delegate
            {                        
                lvFiles.EnsureVisible(i);
                lvFiles.Items[i].Selected = true;
                lvFiles.Select();
                filePath = lvFiles.Items[i].Tag.ToString();
            });
    
            PcapFile pcapFile = new PcapFile();
            pcapFile.sendQueue(filePath, adapter);
            lvFiles.Items[i].Selected = false;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i build an application how take Pcap file (wireshark file) and play the packets,
i am build application who run Wireshark and start sniffing, Wireshark has dumpcap.exe file
a build an application who take video files (avi, mpeg..) and convert to another
I want to build flash application that can detect the user eyes color and
I want to build an application using Quicktime ActiveX interop that could run on
I want to build a web application (SaaS) that can work both in Online
I'm trying to build application that could help me dial a contact just like
What is the preferred way to build application gui components tree? Instantiate all components
I want to build desktop application for Windows OS and use Google Drive to
I need to build my application GUI using HTML/CSS/JavaScript with a C++ backend all

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.