DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2011
    Posts
    2

    lisview topic that doesnt seem to be answered

    In my program i have a listview..this listview has 8 columns,and at least 4000 entry's..now once the listview is filled i need to take whatever is in the last column for each line(in this case a file name) and perform various things on it..from downloading to crc32 calculations.
    I'll concentrate on the crc32 since the code is more compact:
    This is how i have it setup to grab the entry, add whatever directory it might be located in and then perform the calculations.
    Code:
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
          
            Dim Temp As String, a As Long, Path as string
            On Error Resume Next ' because some file names might be missing
            For a = 0 To ListView1.Items.Count
    
                With ListView1.Items(a)
    
                    Temp = Replace(.SubItems(8).Text, "/", "\") 
                    sFileName = Path & Temp
                    TextBox1.Text = GetCRC32(sFileName)
    
                    Application.DoEvents()
                    .SubItems(7).Text = TextBox1.Text
                    ProgressBar1.Value = a * 100 / ListView1.Items.Count
                    ' Call Sleep so the listview is briefly displayed, 
                    'which will create a slide-show effect.
                    System.Threading.Thread.Sleep(20)
                End With
            Next
        End Sub
    So the problem is this,,i need to be able to scroll down the list without the process being stopped ..thus far whenever i click on the scrollbar the code stops until i release the mouse button..also if i click and hold at the top of my form the code also stops running.

    I'm wondering if i need to use multithreading which I've never done before,,and if so how would i add it to the above code to make it work/solve the problem .

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,651
    Quote Originally Posted by RRice View Post
    So the problem is this,,i need to be able to scroll down the list
    Why? What is the purpose of the scrolling while the processing is going on?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    because after a file is completed the word "Complete" is placed in the list, as well as color changes, the crc is all placed back to the list,also the list is editable so if a column is blank you can edit on the fly while downloading etc.
    i need the listview to be completely free of any activity that might be going on elsewhere in the program,but be able to have a percentage of file downloaded going on in one of the columns,,like the download manager IDM no problems scrolling that list while a download is in progress

    so do ya know how to fix the issue?

Similar Threads

  1. project topic help needed
    By sangfroid in forum Security
    Replies: 4
    Last Post: 02-01-2008, 12:59 AM
  2. Spanning Tree topic
    By Shailesh33 in forum Database
    Replies: 0
    Last Post: 09-23-2006, 08:58 PM
  3. Replies: 0
    Last Post: 04-17-2001, 03:20 PM
  4. Re: Anyone care to comment of this topic? VB for COM dev.
    By Jim Anderson in forum Enterprise
    Replies: 0
    Last Post: 01-29-2001, 04:33 PM
  5. Anyone care to comment of this topic?
    By T. Hoskins in forum Enterprise
    Replies: 0
    Last Post: 01-28-2001, 08:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links