TMemo issue on Windows Mobile 6.1 lazarus / 35-Windows CE ---------------------------------------------------------------------- iMan Biglari · 2013-05-06 12:05 I'm writing a very simple terminal application for Windows Mobile. It opens a serial port, and dumps whatever data is coming into a TMemo. The application works just fine on Windows Mobile 5, but on Windows Mobile 6.1, the memo acts strangely. After about 100 characters, no more text is added to the memo and it does not paint itself (e.g. if I open the start menu and close it, the text is not shown anymore). I used this code in a simple application and it reproduced the issue. Any thoughts? procedure TForm1.Button1Cick(Sender: TObject); begin   while not Application.Terminated do   begin     mmPort.Text := mmPort.Text + Chr(Random(90) + 32);     if Random > 0.9 then       Application.ProcessMessages;   end; end; ---------------------------------------------------------------------- bambamns · 2013-05-18 03:40 Hi, Did you tried with TStringGrid ? ---------------------------------------------------------------------- iMan Biglari · 2013-05-18 12:47 Quote from: bambamns on May 18, 2013, 05:40:43 amHi, Did you tried with TStringGrid ? Hi No, because String Grid can not show raw text. I'm currently using a paint box  (I know; that's the worst way to deal with text). ---------------------------------------------------------------------- Cyrax · 2013-05-18 14:38 Quote from: iMan Biglari on May 06, 2013, 02:05:19 pmI'm writing a very simple terminal application for Windows Mobile. It opens a serial port, and dumps whatever data is coming into a TMemo. The application works just fine on Windows Mobile 5, but on Windows Mobile 6.1, the memo acts strangely. After about 100 characters, no more text is added to the memo and it does not paint itself (e.g. if I open the start menu and close it, the text is not shown anymore). I used this code in a simple application and it reproduced the issue. Any thoughts? procedure TForm1.Button1Cick(Sender: TObject); begin   while not Application.Terminated do   begin     mmPort.Text := mmPort.Text + Chr(Random(90) + 32);     if Random > 0.9 then       Application.ProcessMessages;   end; end; You should either use thread or Application.OnIdle (or similar). IMHO using that kind of loop is wrong if you want output something in real time. ---------------------------------------------------------------------- Paul Breneman · 2013-05-20 02:11 I'd like to get this program working in WinCE:   http://www.ctrlterm.com/ Please contact me and maybe we could work together? ---------------------------------------------------------------------- felipemdc · 2013-05-20 11:53 About the original problem: TMemo is a native component, so it might be some kind of issue or limitation on the native control. Try using TCDMemo from the package CustomDrawn. It might work. ---------------------------------------------------------------------- iMan Biglari · 2013-05-20 19:31 Quote from: felipemdc on May 20, 2013, 01:53:49 pmAbout the original problem: TMemo is a native component, so it might be some kind of issue or limitation on the native control. Try using TCDMemo from the package CustomDrawn. It might work. I believe by native component, you mean a standard Windows control. I'm having this problem only when running my application on my phone. Everything seems perfectly normal in the simulator. I'll try TCDMemo in a few days and report the results here. Thanks for the suggestion. ---------------------------------------------------------------------- iMan Biglari · 2013-05-20 19:32 Quote from: Paul Breneman on May 20, 2013, 04:11:35 amI'd like to get this program working in WinCE:   http://www.ctrlterm.com/ Please contact me and maybe we could work together? I'll get back to you in a week or so. I'm currently busy with a major customer.