array <Thread^>^ threads = gcnew array<Thread^>(nbThreads); for (i = 0; i < listView1->Items->Count; i++) { realI = i % nbThreads; if (i >= nbThreads) threads[realI]->Join(); threads[realI] = gcnew Thread(gcnew ParameterizedThreadStart(this, &Form::Function)); threads[realI]->Start(listView1->Items[i]); } realI = (i < nbThreads) ? i : nbThreads; for (i = 0; i < realI; i++) threads[i]->Join(); delete[] threads;