Hello.
So, I have an event I want to do continuously until a button interrupt is pressed.
Here's the pseudocode:
So what I currently have is this:
Unfortunately, it's never breaking outside of the first loop. Any ideas why or suggestions as of how to get around it? Thanks!
So, I have an event I want to do continuously until a button interrupt is pressed.
Here's the pseudocode:
VB.NET:
Click button 1:
Check if button 2 is pressed
If not, do stuff
If so, stop doing stuff
End routine
So what I currently have is this:
VB.NET:
Dim randominteger As Integer = 0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartSampleButton.Click
While 1
If randominteger = 0 Then
'Do Stuff Here
ElseIf randominteger = 1 Then
Exit While
End If
End While
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TakeSampleButton.Click
randominteger = 1
End Sub
Unfortunately, it's never breaking outside of the first loop. Any ideas why or suggestions as of how to get around it? Thanks!