Updating my thread box program
Send Message(Int32 msg, Int32 wparam, String lparam) at System.
It seems to still be doing all the processing of the GUI once the reading has finished. In addition, I confirmed when the progress actually changes.
Update: I have tried this code: That now seems to work. dl=0 It just doesn't all process quite as I expect. Beep() to establish when my progress change handler was being fired. ISSUE 2 The logic for calculating the progress needed to be adjusted because in this context the result was always 0 due to the way the calculation worked.
In the answer on the other post it suggests: How do I change it so that I can get the list boxes populated and: a) Not get the cross-thread exception b) Not choke the GUI due to the updating of the list boxes Thank you!
Forms; namespace Find_Duplicate_MX_codes If I comment out the line of code that tries to add an item to the list box is works. It is when I try to update the listbox that it fails.
I have found an article on this subject but I can't quite get my head around how to implement the answer proposed.
What I am getting is a cross-thread exception and I realise that the GUI is in one thread and the worker is in another thread. Invalid Operation Exception was unhandled by user code HResult=-2146233079 Message=Cross-thread operation not valid: Control 'list Box Codes' accessed from a thread other than the thread it was created on.
Status Bar = Format(fraction Done, "0%") & " done..." ''// or, alternatively: ''// status Range.value = Format(fraction Done, "0%") & " done..." ''// Some code....... Display Status Bar = boo Status Bar State ''//Reset Status bar display setting Application.
Status Bar = False ''//Return control of the Status bar to Excel Application.
But the screen doesn't refresh, or stops refreshing at some point (e.g. The task eventually completes but the progress bar is useless. For i=1 to imax ' imax is usually 30 or so fraction Done=cdbl(i)/cdbl(imax) Application.
Status Bar = Format(fraction Done, "0%") & "done..." ' or, alternatively: ' status Range.value = Format(fraction Done, "0%") & "done..." ' Some code.......
Next i Sub Progress Meter() Dim boo Status Bar State As Boolean Dim i Max As Integer Dim i As Integer i Max = 10000 Application.Tags: Adult Dating, affair dating, sex dating