Re: Need help with boolean
That code does what it does, but if it's not executed in a useful place then what it does is useless. Where is it executed? We need context.
Re: Need help with boolean
As jmcilhinney said, we need a little more info.
You can add a messagebox into your code. That will pop up and tell you WHEN the value has been calculated to that amount.
Code:
If total.Value = 1073741824 Then
tb.Text = "test"
MsgBox("test")
End If
If you don't see the message box, then it never reaches that number.
.
Re: Need help with boolean
Quote:
Originally Posted by MrGTI
As jmcilhinney said, we need a little more info.
You can add a messagebox into your code. That will pop up and tell you WHEN the value has been calculated to that amount.
Code:
If total.Value = 1073741824 Then
tb.Text = "test"
MsgBox("test")
End If
If you don't see the message box, then it never reaches that number.
.
That method was used before there were proper debug tools. Visual Studio provides excellent debugging, use a breakpoint instead;)
Re: Need help with boolean
Ok,Here is exactly where it is:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
total.Value = bytes.RawValue
TextBox1.Text = bytes.RawValue
If total.Value = 1073741824 Then
tb.Text = "test"
End If
End Sub
End Class
And it still wont change the text in tb.
Re: Need help with boolean
Are you sure the Timer is Enabled? If it is then presumably total.Value never actually equals that value.
Re: Need help with boolean
What datatype is total.value?
Re: Need help with boolean
The Timer is enabled and working,Total is the name for my progress bar,Value gets or sets the progress of the bar.
Re: Need help with boolean
Could your number accumulator (total) be incementing faster than your timer polls for its value?
Somehow you should tie an event to the changing of total and check the value there.