Hello.
VS2005 - VB Windows App
I have the following sub-routine in my code:
Friend Sub WaitCursor(ByVal wait As Boolean)
If wait Then
Windows.Forms.Cursor.Current = Cursors.WaitCursor
Else
Windows.Forms.Cursor.Current = Cursors.Default
End If
End Sub
Now I notice that if I call WaitCursor(true) and then WaitCursor(true) again, the 2nd time it's called it actually executes both condition branches, sets the cursor to wait and then to default at the same time!!! What in the world is going on here? I have noticed other such misbehaviours when testing a boolean variable, it randonly skips code within the execute block, I mean just jumps to a statement out of sequence!!
Scary. Unless some one can explain this weird behaviour. I mean how can something be both true and false at the same time? This is how it behaves!
Thanks
VS2005 - VB Windows App
I have the following sub-routine in my code:
Friend Sub WaitCursor(ByVal wait As Boolean)
If wait Then
Windows.Forms.Cursor.Current = Cursors.WaitCursor
Else
Windows.Forms.Cursor.Current = Cursors.Default
End If
End Sub
Now I notice that if I call WaitCursor(true) and then WaitCursor(true) again, the 2nd time it's called it actually executes both condition branches, sets the cursor to wait and then to default at the same time!!! What in the world is going on here? I have noticed other such misbehaviours when testing a boolean variable, it randonly skips code within the execute block, I mean just jumps to a statement out of sequence!!
Scary. Unless some one can explain this weird behaviour. I mean how can something be both true and false at the same time? This is how it behaves!
Thanks