最简单的方法,用任何c++编译器写一个dll
如果一定要用vb生成线程……没试过

解决方案 »

  1.   

    Use Visual Basic 6.0 Only......
      

  2.   

    在http://www.planet-source-code.com/vb/
    有多线程下载的程序。具体位置不记得了,你可以以Thread为关键字查找
      

  3.   

    如何恢复已经悬挂的线程?为什么用ResumeThread mHandleofThread 出现非法操作?。
      

  4.   

    请高手帮着看看,哪儿错了:'model
    Public Function CreateNewThread(ByVal iDownloader As Long, ByVal cFunction As Long, Optional ByVal cPriority As Long = 0, Optional ByVal cEnabled As Boolean = True) As Long
        Dim mHandle As Long
        Dim CreationFlags As Long
        Dim lpThreadId As Long
     
         'CreationFlags = CREATE_SUSPENDED
         CreationFlags = 0
        mHandle = CreateThread(ByVal 0&, ByVal 0&, cFunction, ByVal 0&, CreationFlags, lpThreadId)
        CreateNewThread = mHandle
        If mHandle = 0 Then 'Failed creating the thread
            Debug.Print "InitializeThread Function in clsThreading failed creating a new thread"
        End If
    End Function
      Function test0() As Long
    Form1.List1.AddItem "test0"
    End Function
      Function test1() As Long
    Form1.List1.AddItem "test1"
    End Function
      Function test2() As Long
    Form1.List1.AddItem "test2"
    End Function
      Function test3() As Long
    Form1.List1.AddItem "test3"
    End Function
      Function test4() As Long
    Form1.List1.AddItem "test4"
    End Function
    'form
    Dim h1, h2, h3, h4, h5 As Long
    Private Sub Command2_Click()
    h1 = CreateNewThread(0, AddressOf test0, 0, True)
    h2 = CreateNewThread(1, AddressOf test1, 0, True)
    h3 = CreateNewThread(2, AddressOf test2, 0, True)
    h4 = CreateNewThread(3, AddressOf test3, 0, True)
    h5 = CreateNewThread(4, AddressOf test4, 0, True)
    End Sub
      

  5.   

    如何用VC生成一个VB能调用的DLL,哪儿有相关的资料?请高手指点。