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.
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.
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
Temp = Replace(.SubItems(8).Text, "/", "\")
sFileName = Path & Temp
TextBox1.Text = GetCRC32(sFileName)
.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.
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 .
Why? What is the purpose of the scrolling while the processing is going on?
Originally Posted by RRice
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
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?
By sangfroid in forum Security
Last Post: 02-01-2008, 12:59 AM
By Shailesh33 in forum Database
Last Post: 09-23-2006, 08:58 PM
By Marion Elledge in forum XML
Last Post: 04-17-2001, 03:20 PM
By Jim Anderson in forum Enterprise
Last Post: 01-29-2001, 04:33 PM
By T. Hoskins in forum Enterprise
Last Post: 01-28-2001, 08:28 PM
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