I recently start learning about multi threading. I'd want to know is my code right or wrong.

VB Code:
  1. Public Class Form1
  2.  
  3.     Private Delegate Sub SetTextCallBack(ByVal val As Integer)
  4.     Dim t As Threading.Thread
  5.     Dim i As Integer = 0
  6.  
  7.     Private Sub SetText(ByVal val As Integer)
  8.         If Me.Label1.InvokeRequired Then
  9.             Dim d As New SetTextCallBack(AddressOf SetText)
  10.  
  11.             'I have used Me.Label1.begininvoke; Me.Label1.invoke; Me.begininvoke; Me.invoke
  12.             'The result is same
  13.             'The only difference is if doloop didn't sleep, begininvoke will stop responding
  14.             'Me.BeginInvoke(d, val)
  15.             Me.Invoke(d, val)
  16.         Else
  17.             Label1.Text = val
  18.         End If
  19.     End Sub
  20.  
  21.     Private Sub doLoop()
  22.         While i < 10000
  23.             If i > 9000 Then
  24.                 i = 0
  25.             End If
  26.  
  27.             If i Mod 100 = 0 Then
  28.                 Me.SetText(i)
  29.                 Threading.Thread.Sleep(100)
  30.             End If
  31.  
  32.             i += 1
  33.         End While
  34.  
  35.         MessageBox.Show("Finished")
  36.     End Sub
  37.  
  38.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  39.         'Me.doLoop()
  40.  
  41.         t = New Threading.Thread(New Threading.ThreadStart(AddressOf doLoop))
  42.         t.Start()
  43.     End Sub
  44.  
  45.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  46.         't.Abort() 'I've read some article that I should not use this.
  47.         'Me.Text = "Button2"
  48.         i = 10000
  49.         t.Join() 'Or use t=nothing
  50.     End Sub
  51. End Class

My question is: Does this code right? It seems that doloop procedure must sleep for a while if I want my UI thread keep responding.