Code:
    Public Delegate Sub SetText(ByVal sText As String)
    Public Class Recurse
        Public sDirectory As String
        Public TextDelegate As SetText

        Public Sub Recurse()
            TextDelegate(sDirectory)
        End Sub
    End Class


                Dim r As New Recurse
                r.sDirectory = tbSearchFolder.Text

                If cbSearchSubDirectories.Checked Then
                    r.TextDelegate = AddressOf RecurseDirectories
                    Dim RecurseThread As New Threading.Thread(AddressOf r.Recurse)
                    RecurseThread.Name = "RecurseThread"
                    RecurseThread.IsBackground = True
                    RecurseThread.Start()
                End If
I do not want to run anymore code until the thread finishes. I still want the app to be active, but I want to wait until the thread finishes it's process before continuing. How would I do this?

By the way, I am making a File Searching program.