Code:
imports system.threading

class form1

private sub hochzählen()
for i as integer = 1 to 100
progressbar1.value = i
Thread.sleep(100)'gibt an, wie lange gewartet werden soll.
next
textbox1.text = "Hurensohn"
end sub

sub button1_Click()
dim HochzählThread as new thread(Addressof hochzählen)
HochzählThread.isbackground = true
control.CheckForIllegalCrossThreadCalls = false
HochzählThread.start
end sub


end class