Private Shared th As New Thread(New ThreadStart(showProgressForm))
Public Sub startProgress()
th = New Thread(New ThreadStart(showProgressForm))
th.Name = "first"
th.Start()
End Sub
Private Sub btnStartThread_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
Dim thread As System.Threading.Thread = New System.Threading.Thread(AddressOf ThreadStart)
thread.Start()
End Sub
Private Sub ThreadStart()
Dim strReturn As String
Dim display As New Action(Of String)(AddressOf AddTextByDispatcher)
'*** Process in Thread
'*** Process in Thread
strReturn = "String Return"
Dispatcher.BeginInvoke(display, strReturn) ' call AddTextByDispatcher()
'*** Process in Thread
'*** Process in Thread
End Sub
Private Sub AddTextByDispatcher(ByVal strReturn As String)
Me.txtResult.Text = strReturn
End Sub