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

VB 2010 Progress Bar.

$
0
0

You have changed the code you were provided with so it no longer works.  The preferable option is to insert your changes in a modular fashion, so that it is possible to compare the original and the changed code, and to confirm that your changes are providing the same data that the original code was expecting.

Your code should look like this:

 

        If outLine.Data <> "" Then
            Dim PC As Integer = Val(outline.data.substring(1))
            
Dim S As String = PC.ToString
            
If PC <> 0 Then
                   BeginInvoke(Sub() Text = S)
            
End If
        End If

Then put a breakpoint on the DIM line, check the value of outline.Data, make sure that the parsing is going to work, and step the code through line by line to make sure the result is what you want.   There's no point in trying to cram everything into one line. You can simplify it after it's working properly.

But I don't see why you are using asynchronous calls. Also, the lanbas will be inefficient for something likely to be called frequently.  

 


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>