703
社区成员
发帖
与我相关
我的任务
分享
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
MSComm1->OutBufferCount = 0;
MSComm1->Output = Edit1->Text + "\r";
MSComm1->RThreshold = 1;
Memo1->Lines->Add("\n" + Edit1->Text);
Memo1->Lines->Add(temp);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::MSComm1Comm(TObject *Sender)
{
OleVariant rec;
rec = MSComm1->Input;
temp = temp + rec.AsType(varString);
MSComm1->InBufferCount = 0;
}
//---------------------------------------------------------------------------