procedure TFmain.TntButton_generate_ReportClick(Sender: TObject);
Var i,j,k,o : Integer;
st1 :
String;
tick1,tick2 : Dword;
begin
tick1 := GetTickCount;
j := ListBox_HEX.Items.Count - 1;
RichEdit1.Lines.BeginUpdate;
RichEdit1.Lines := ListBox_HEX.Items;
for i:= 0
to j
do Begin
with RichEdit1
do Begin
SelStart := SendMessage(
Handle, EM_LINEINDEX, i, 0);
SelLength := Length(Lines[i]);
SelAttributes.Color := TColor(ListBox_HEX.Items.Objects[i]);
end;
end;
RichEdit1.Lines.EndUpdate;
tick2 := GetTickCount;
tick2 := tick2 - tick1;
Fmain.Memo_Status.Lines.Add('
Tick : ' + inttostr(Tick2));
end;
// Routine 2
procedure TFmain.TntButton_generate_ReportClick(Sender: TObject);
Var i,j,k,o : Integer;
st1 :
String;
tick1,tick2 : Dword;
begin
tick1 := GetTickCount;
j := ListBox_HEX.Items.Count - 1;
RichEdit1.Lines.BeginUpdate;
for i:= j
downto 0
do Begin
with RichEdit1
do Begin
st1 := ListBox_HEX.Items[i];
SelStart := 0;
SelAttributes.Color := TColor(ListBox_HEX.Items.Objects[i]);
SelText := st1 + #13#10;
end;
end;
RichEdit1.Lines.EndUpdate;
tick2 := GetTickCount;
tick2 := tick2 - tick1;
Fmain.Memo_Status.Lines.Add('
Tick : ' + inttostr(Tick2));
end;
// Routine 3
procedure TFmain.TntButton_generate_ReportClick(Sender: TObject);
Var i,j,k,o,ins_Pos : Integer;
st1 :
String;
tick1,tick2 : Dword;
begin
tick1 := GetTickCount;
j := ListBox_HEX.Items.Count - 1;
RichEdit1.Lines.BeginUpdate;
for i:= 0
to j
do Begin
with RichEdit1
do Begin
st1 := ListBox_HEX.Items[i];
SelStart := ins_Pos;
SelAttributes.Color := TColor(ListBox_HEX.Items.Objects[i]);
SelText := st1 + #13#10;
inc(ins_Pos,length(st1) + 2);
end;
end;
RichEdit1.Lines.EndUpdate;
tick2 := GetTickCount;
tick2 := tick2 - tick1;
Fmain.Memo_Status.Lines.Add('
Tick : ' + inttostr(Tick2));
end;