Quick Report
Estou usando o Delphi 7, tenho a seguinte procedure para pesquisar uma palavra no Quick Report, gostaria de que quando achasse a palavra, desse um destaque para ela, alguém pode me ajudar.
A Procedure é a seguinte:
procedure TQRStandardPreview.ToolButton3Click(Sender: TObject);
var
FindStr : string;
MatchCase, flgAchou : boolean;
I : integer;
APage : TMetafile;
begin
flgAchou := false;
FindStr := xUltimaPes;
if GetTextSearch(MatchCase, FindStr) then
begin
if FindStr <> xUltimaPes then
xUltimaPag := 0;
if xUltimaPag = QRPrinter.PageCount then
xUltimaPag := 0;
for I := 1 to QRPrinter.PageCount do
begin
if I > xUltimaPag then
Begin
APage := QRPrinter.GetPage(I);
try
if StrInMetafile(FindStr, APage, MatchCase) then
begin
SelectPage(I);
flgAchou := true;
xUltimaPag := I;
exit;
end;
finally
APage.Free;
end;
end;
end;
if flgAchou = false then
begin
xUltimaPag := 0;
Application.MessageBox(´Nenhuma ocorrência foi encontrada para a Pesquisa´,´Pesquisar Texto´,MB_OK);
end;
end;
end;marcianosouza1
Data de registro: 14/10/2008 23:26:31
Mensagem PrivadaE-mail
A Procedure é a seguinte:
procedure TQRStandardPreview.ToolButton3Click(Sender: TObject);
var
FindStr : string;
MatchCase, flgAchou : boolean;
I : integer;
APage : TMetafile;
begin
flgAchou := false;
FindStr := xUltimaPes;
if GetTextSearch(MatchCase, FindStr) then
begin
if FindStr <> xUltimaPes then
xUltimaPag := 0;
if xUltimaPag = QRPrinter.PageCount then
xUltimaPag := 0;
for I := 1 to QRPrinter.PageCount do
begin
if I > xUltimaPag then
Begin
APage := QRPrinter.GetPage(I);
try
if StrInMetafile(FindStr, APage, MatchCase) then
begin
SelectPage(I);
flgAchou := true;
xUltimaPag := I;
exit;
end;
finally
APage.Free;
end;
end;
end;
if flgAchou = false then
begin
xUltimaPag := 0;
Application.MessageBox(´Nenhuma ocorrência foi encontrada para a Pesquisa´,´Pesquisar Texto´,MB_OK);
end;
end;
end;marcianosouza1
Data de registro: 14/10/2008 23:26:31
Mensagem PrivadaE-mail
Marcianosouza
Curtidas 0