十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
使用api
峡江ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18980820575(备注:SSL证书合作)期待与您的合作!
Private Declare Function TerminateThread Lib "kernel32" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For s = 1 To 11 Step 10
t1 = New Threading.Thread(AddressOf setA)
t2 = New Threading.Thread(AddressOf setB)
t3 = New Threading.Thread(AddressOf setC)
t4 = New Threading.Thread(AddressOf setD)
t5 = New Threading.Thread(AddressOf setE)
t6 = New Threading.Thread(AddressOf setF)
t7 = New Threading.Thread(AddressOf setG)
t8 = New Threading.Thread(AddressOf setH)
t9 = New Threading.Thread(AddressOf setI)
t10 = New Threading.Thread(AddressOf setJ)
错误》》》 t1.Start()
t2.Start()
t3.Start()
t4.Start()
t5.Start()
t6.Start()
t7.Start()
t8.Start()
t9.Start()
t10.Start()
Next
同楼上,每个Thread只能运行一次
如果需要等待T2线程结束,那又何必开启这个线程!!
直接:
Label1.Visible = True
setB()
MsgBox("d")
这不就是执行完setB(),再执行MsgBox("d"),多线程是多余的。
多线程的作用大多数也就用来同时执行多任务而不用等待的。