G
Guest
Hello all,
I have a form and a button. The code for the button is as follows
Sub tProc()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim i
For i = 1 To 1000
Dim t As New System.Threading.Thread(AddressOf tProc)
t.Start()
While t.IsAlive = True
Application.DoEvents()
End While
Next
End Sub
The problem is that when I start my code by clicking the button, if I then
try
to click on the terminate button (top-right button of titlebar), then
instead
of it being depressed, my button is depressed, i.e. there is a mismatch
between
what I press and what I see on the screen.
Thanks in advance for any assistance.
I have a form and a button. The code for the button is as follows
Sub tProc()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim i
For i = 1 To 1000
Dim t As New System.Threading.Thread(AddressOf tProc)
t.Start()
While t.IsAlive = True
Application.DoEvents()
End While
Next
End Sub
The problem is that when I start my code by clicking the button, if I then
try
to click on the terminate button (top-right button of titlebar), then
instead
of it being depressed, my button is depressed, i.e. there is a mismatch
between
what I press and what I see on the screen.
Thanks in advance for any assistance.