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;