Quantcast
Channel: VB 2010 Progress Bar.
Viewing all articles
Browse latest Browse all 41

VB 2010 Progress Bar.

$
0
0

Your vast number of running processes is due to that fact that you are calling your routine recursively.   Therefore, a single variable, even if you are updating it correctly, will never give you access to all the processes.   Do you need to call that routine recursively?   I can't work out from that code what you are trying to do, but the correct process would be for the routine to kill itself when it completes, so that you don't have to worry about tracking the instances with variables.  Also, you don't want to wait until the application closes before killing them - they should close as soon as possible after they are no longer useful.

To get the characters you want, you should go back to my original code. ooutline.data.substring(1) gives you

00.0%] 0/100 frames, 2.00 fps, 700.07 Kb/s, eta 4:30:00

and the Val of that will stop at the % sign, so you will get 00.0 in this case, or the actual percentage in other cases.

If you use split that then you get an array of string.   Element 1 is "0/100". So your expression should be:

outLine.Data.Substring(1).Split(" ")(1)

But if you use that value rather than the percentage, you still need to separate it at the "/".  The Val function is a quick and dirty way to do that.


Viewing all articles
Browse latest Browse all 41

Trending Articles