hello, i have a question of threads, im making some tests, and i want to get
a value of a variable inside a thread, but i want to retrieve from outside of
it..
was it clear?
'when i clic the button its start the thread. completes a variable in
the class, and starts.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim Class1 As New TPruebas
Dim myT As New Threading.Thread(AddressOf Class1.myThread)
Class1.myInt = 100
myT.Start()
End Sub
Public Class TPruebas
Public myInt As Double
Public incInt As Double
Public Sub myThread()
For incInt = 0 To myInt * 1000
Thread.Sleep(250)
'I put the values of the for in a textbox so i know that the
thread is running.
txtCount.text = incInt
Next
End Sub
End Class
'now when i push this button, i want that this sub, retrieves the values
from the thread, all my trys where fails. some one could tell me, how to do
it, and if this is posible?
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
End Sub
i didnt find a way of do it...
thanks...!!!