Dim aDoa = WaitKeyIf a = 49 Then //按键1 开始线程x BeginThread x ElseIf a = 50 Then//按键2 开始线程y BeginThread yEnd IfLoopSub x MessageBox "x"End SubSub y MessageBox "y"End Sub单独停止的话就只要加上StopThread x和StopThread y就行了。希望能对您有帮助