Hy guys! (Both from mars and venus!)
I am new today, really happy about this forum. Good answers, good questions!
Now I would like to try to solve my most urgent problem:
I am a BCB5 programmer, writing an application that has to communicate a lot via RS232/Modem.
For now, I have purchased the ZComm-package, which gives the ability to write and read a "text" property directly to/from the connected port. That works fine, when i don't care about linefeeds etc.
In my application I used a TListBox in the beginning, then a TMemo for output the echo of the remote machine in my application. Both have TStrings as Items(Lines), making it impossible to write several characters one after the other into one line(TString). I did try checking the incoming data for a "linefeed" and closing an AnsiString which I created after the last TString was added to the Memo. My problem here now is: I do not get accurate data all the time, sometimes I get more than the Textstring that was sent.
I tried to replace the "Text" property of TMemo every time the "OnDataAvailable"-Event was triggered, and I got finer results, sometimes even a whole string in clear text, no scrap, coming from the connected unit (4 characters and the cursor keeps in the same line after those characters). But, this remote unit also gives back its "echo" one character at a time, not resulting in a string in my object. The TMemo is Read-Only, so that I just receive the echoed char's and don't see my typed char's.
My question now is:
Is there an object within BCB5 or in the wide field of programmers-code that can accept characters and append/display characters (and eg a <CR>) into a field?
Thanx for your patience to get through this!
--micha
I am new today, really happy about this forum. Good answers, good questions!
Now I would like to try to solve my most urgent problem:
I am a BCB5 programmer, writing an application that has to communicate a lot via RS232/Modem.
For now, I have purchased the ZComm-package, which gives the ability to write and read a "text" property directly to/from the connected port. That works fine, when i don't care about linefeeds etc.
In my application I used a TListBox in the beginning, then a TMemo for output the echo of the remote machine in my application. Both have TStrings as Items(Lines), making it impossible to write several characters one after the other into one line(TString). I did try checking the incoming data for a "linefeed" and closing an AnsiString which I created after the last TString was added to the Memo. My problem here now is: I do not get accurate data all the time, sometimes I get more than the Textstring that was sent.
I tried to replace the "Text" property of TMemo every time the "OnDataAvailable"-Event was triggered, and I got finer results, sometimes even a whole string in clear text, no scrap, coming from the connected unit (4 characters and the cursor keeps in the same line after those characters). But, this remote unit also gives back its "echo" one character at a time, not resulting in a string in my object. The TMemo is Read-Only, so that I just receive the echoed char's and don't see my typed char's.
My question now is:
Is there an object within BCB5 or in the wide field of programmers-code that can accept characters and append/display characters (and eg a <CR>) into a field?
Thanx for your patience to get through this!
--micha