Реферат: Разработка многопоточных Windows-приложений в среде Borland C Builder
void __fastcall T1::Execute()
{
for (;;)
{
Synchronize(OutOnForm1);
Sleep(100);
}
}
//---------------------------------------------------------------------------
T2.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "T2.h"
#include "Unit2.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
__fastcall T2::T2(bool CreateSuspended)
: TThread(CreateSuspended)
{
}
//---------------------------------------------------------------------------
void __fastcall T2::OutOnForm2()
{ static int i=10;
Form2->Label1->Left-=i ;
if (Form2->Label1->Left < -160)
{Form2->Label1->Left=370;}
}
//---------------------------------------------------------------------------