Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim T As New Threading.Thread(AddressOf Worker)
T.Start()
End Sub
Private Sub Worker()
Dim curTxt As String
Dim cbText As String
Dim newTxt As String
For i As Integer = 1 To 5
curTxt = TextBox1.Text()
cbText = ComboBox1.SelectedItem
newTxt = curTxt & i.ToString & " "
TextBox1.Text = newTxt
System.Threading.Thread.Sleep(1000)
Next
End Sub
End Class
|