SCAR Code:
program New;
var
MainForm: TForm;
procedure InitForm;
begin
MainForm := CreateForm;
MainForm.Width := 400;
MainForm.Height := 400;
MainForm.Caption := 'MainForm';
MainForm.Color := clBtnFace;
MainForm.BorderIcons := [biSystemMenu];
MainForm.BorderStyle := bsSingle;
MainForm.Font.Color := clWindowText;
MainForm.Font.Height := -11;
MainForm.Font.Name := 'MS Sans Serif';
MainForm.Font.Style := [];
MainForm.PixelsPerInch := 96;
with TRichEdit.Create(MainForm) do
begin
Parent := MainForm;
Align := alClient;
ScrollBars := ssBoth;
HideScrollBars := False;
Text := 'hello there '+Chr(13)+'123'+chr(13)+'456';
SelStart := 0;
SelLength := Length('hello there ');
SelAttributes.Color := clTeal;
SelStart := Length('hello there ') + 1;
SelLength := Length('123');
SelAttributes.Style := SelAttributes.Style + [fsBold];
SelLength := 0;
end;
end;
procedure ShowFormModal;
begin
MainForm.ShowModal;
end;
var
v: TVariantArray;
begin
v := [];
ThreadSafeCall('InitForm', v);
ThreadSafeCall('ShowFormModal', v);
FreeForm(MainForm);
end.