Here is the simplest multi-threaded applet written with BCB
//.CPP thread description _fastcall tmythread :: Tmythread (void): tthread (true) {freeOnterminate = true; resume ();}
// Declaration thread void __fastcall tmythread :: execute () // thread function {for (int i = 1; i <4; i ) Form1-> memo1-> text = form1-> memo1-> text INTOSTR (i) "I get the parameters - my thread / r / n";} void __fastcall tform1 :: button2click (TOBJECT * Sender) // Exercise {Mythread = New Tmythread (); mythread-> freeOnterminate = true;}
/ 类 类 定 声 声;;;;;;;;;;;;;;;;;;;;;;;;
/ / Can join TMYTHREAD * mythread; // declare a thread in the .h form class definition.
This is a simple multi-threaded program