|
델파이는 이런 형식의 예문이나 소스 파일이 많던데.ㅠㅠ..
4시간 넘게 찾아보아도 도저히 못찾겠네요.
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IdTCPClient1->Connect();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
IdTCPClient1->WriteLn(Edit1->Text);
Edit1->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
AnsiString stTemp;
if (IdTCPClient1->Connected() == true) {
stTemp = IdTCPClient1->ReadLn("\n",5);
if(stTemp.Length() > 0 ) Memo1->Lines->Add(stTemp);
}
}
//-----------------------------------------------------
위에것이 류형택님의 소스 파일입니다.
답변 부탁드려요.ㅠㅠ
|