Home > Back-end >  C builder serial communication
C builder serial communication

Time:09-24

C + + builder serial port communication, how the data received continuous display and not be cleared in the Memo,

CodePudding user response:

AnsiString STR="hello";
AnsiString s=AnsiString (). Sprintf (" data values are: % d, % d ", x, y);
Memo1 - & gt; Lines - & gt; Add (STR);
Memo1 - & gt; Lines - & gt; Add (s);

CodePudding user response:

AnsiString s="data value:" + IntToStr (I) + ", "+ FloatToStr (f);

CodePudding user response:

Like this, in Mmeo shows, this how to change?
I'd like to accept the data line display in Mmeo
 

The switch (MSComm1 - & gt; CommEvent)
{
Case 2:
Memo1 - & gt; Text=MSComm1 - & gt; The Input;
//show accept data
break;
}

CodePudding user response:

MSComm1 - & gt; What is the Input data type?
Use it to construct a AnsiString, then
Memo1 - & gt; Lines - & gt; Add (,,);

CodePudding user response:

reference 4 floor ooolinux response:
MSComm1 - & gt; What is the Input data type?
Use it to construct a AnsiString, then
Memo1 - & gt; Lines - & gt; Add (,,);

Oh, got it, thank you very much, dial the open cloud mist
  • Related