Реферат: Разработка многопоточных Windows-приложений в среде Borland C Builder
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Label9->Caption="Запущен";
Form2->Show();
Thread2->Resume();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Label9->Caption="Приостановлен";
Thread2->Suspend();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Label9->Caption="Завершён";
Thread2->Terminate();
Form2->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
{
switch (RadioGroup1->ItemIndex)
{
case 0: Thread2->Priority=tpLowest;
break;
case 1: Thread2->Priority=tpNormal;
break;
case 2: Thread2->Priority=tpHighest;