I have to run a certain thread every second refreshes the message field, but without using any time controls. I wonder if there is any alternative to timer control. My be background worker or something of that sort. 

This what I have so far. It suppose to run every second but it doesn't

```
Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim myThread As New System.Threading.Thread(AddressOf GetData)
    myThread.Start()
    Thread.Sleep(1000)
End Sub

```

And this is function which he is calling to:

```
Delegate Sub SetTextCallback(ByVal newString As String)

Private Sub SetText(ByVal [text] As String)
    If Me.ChatBox.InvokeRequired Then
        Dim d As New SetTextCallback(AddressOf SetText)
        Me.Invoke(d, New Object() {[text]})
    Else
        Me.ChatBox.Text = [text]
    End If
End Sub​

Sub GetData()
    Try
        conn.Open()
        Dim Query = "SELECT * fROM messages where Time_Posted > Now()"
        Dim cmd As MySqlCommand = New MySqlCommand(Query, conn)
        Dim theREader As MySqlDataReader = cmd.ExecuteReader
        SetText("")
        Dim Temp as String = ""
        Do While theREader.Read()
            Temp &= theREader.GetString(0) & vbCrLf
        Loop
        SetText(Temp)
        conn.Close()
    Catch ex As Exception
        MsgBox(ex.Message.ToString())
        conn.Close()
    End Try
 GetData()
End Sub

```

I wonder if there any way how can I make the thread run repeatedly without using timer? 

Thank you in advance for any help and suggestions

THIS IS CORRECTED CODE AFTER THE PROBLEM WAS SOLVED