O
One Handed Man [ OHM# ]
Pressing Button2 does cause the breakpoint shown in Button1's handler to be active the first time. After stopping the program and restarting it it break as soon as you start Button1,
Any ideas what I might be doing wrong ?
--
Best Regards - OHM
O_H_M{at}BTInternet{dot}com
-------------------- CODE BELOW ------------------
'At Class Level
Private breakpoint As Boolean = False
'//Start the loop
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim c As Integer
Dim b As Integer = 1
For a = 0 To 1000000
c = 0 '<< My Breakpoint properties are when me.breakpoint as changed
Application.DoEvents()
Debug.WriteLine(breakpoint)
Next
End Sub
'//Stop the loop
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
breakpoint = Not breakpoint
End Sub
Any ideas what I might be doing wrong ?
--
Best Regards - OHM
O_H_M{at}BTInternet{dot}com
-------------------- CODE BELOW ------------------
'At Class Level
Private breakpoint As Boolean = False
'//Start the loop
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim c As Integer
Dim b As Integer = 1
For a = 0 To 1000000
c = 0 '<< My Breakpoint properties are when me.breakpoint as changed
Application.DoEvents()
Debug.WriteLine(breakpoint)
Next
End Sub
'//Stop the loop
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
breakpoint = Not breakpoint
End Sub