If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

(vb.net) Stop a thread execution on a button click

Hi guys!
I'm a beginner in vb.net and my first project is build to check out if the internet is up our down. To do it, I want to start a thread, on a "start button" click. Once started, the sub execute a ping on three different web site in a loop until I click the stop button. When I click the "stop button", I would like to set a public boolean to "true" to force the sub to stop looping and let it end by itself. How can I do that? By clicking a button, how can I change the value of a boolean defined in the sub of this thread?