
本站地址:http://www.bajiao123.com

使用Visual Basic 6实现真正实用的多线程处理
Private Sub Command2_Click()
oTest1.StopSub
oTest2.StopSub
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set oTest1 = Nothing
Set oTest2 = Nothing
End Sub
Private Sub oTest1_Progress(ByVal lProgress As Long)
List1.AddItem lProgress
List1.ListIndex = List1.ListCount - 1
End Sub
Private Sub oTest2_Progress(ByVal lProgress As Long)
List2.AddItem lProgress
List2.ListIndex = List2.ListCount - 1
End Sub
启动Project1,点击Command1,怎么样,看见来效果了吗? 试着把TestExe的Thread pool改成1看看会怎么样? 这是我认为最简单且稳固的多线程实现方法了,大家有什么好的想法欢迎留言.
本站地址:http://www.bajiao123.com

