?
Solved

I need help in speeding up my delphi code

Posted on 2007-08-05
11
Medium Priority
?
859 Views
Last Modified: 2013-11-23
I have an application that downloads webpages to hard drive, loads them one at a time into a memo then searches for text.  It works ok but when you run it, the procedure takes over all control on the form.  I can't click any buttons and I had to hard code in refresh statements so I can see what is happening.  It may run for 15 minutes or so, then it sometimes locks up trying to access the data file on the hard drive.

I need an expert to look at the code and see where the problems may be.  I think it is sucking up a lot of memory but I'm not sure.

Here is the unit.

unit sortfriends;

interface

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, SHDocVw_TLB, Menus, ExtCtrls, shellapi,WinInet,
  ComCtrls, jpeg;

type
  TFormSort = class(TForm)
    Sort: TButton;
    ListBox1: TListBox;
    Label1: TLabel;
    ListBox2: TListBox;
    Label2: TLabel;
    Label3: TLabel;
    Stop: TButton;
    Edit1: TEdit;
    Label10: TLabel;
    Panel1: TPanel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Bevel1: TBevel;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Image1: TImage;
    Button1: TButton;
    WebBrowser1: TWebBrowser;
    Memo1: TMemo;
    ProgressBar1: TProgressBar;
    Label11: TLabel;
    Button3: TButton;
    procedure FormCreate(Sender: TObject);
    procedure SortClick(Sender: TObject);
    procedure StopClick(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
    procedure ListBox2Click(Sender: TObject);
    procedure Com2save(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Start(Sender: TObject);
    procedure Find(sender: TObject);
   

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormSort: TFormSort;

implementation

uses unit1;

{$R *.dfm}

function GetInetFile (const fileURL, FileName: String): boolean;
const
  BufferSize = 1024;
var
  hSession, hURL: HInternet;
  Buffer: array[1..BufferSize] of Byte;
  BufferLen: DWORD;
  f: File;
  sAppName: string;
begin
 result := false;
 sAppName := ExtractFileName(Application.ExeName) ;
 hSession := InternetOpen(PChar(sAppName), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0) ;
 try
  hURL := InternetOpenURL(hSession, PChar(fileURL), nil, 0, 0, 0) ;
  try
   AssignFile(f, FileName) ;
   Rewrite(f,1) ;
   repeat
    InternetReadFile(hURL, @Buffer, SizeOf(Buffer), BufferLen) ;
    BlockWrite(f, Buffer, BufferLen)
   until BufferLen = 0;
   CloseFile(f) ;
   result := True;
  finally
   InternetCloseHandle(hURL)
  end
 finally
  InternetCloseHandle(hSession)
 end
end;



procedure TFormSort.Com2save(Sender: TObject);
var
    fname,path,report1,report2 : string;
begin

fname := 'report.html';
      path := ExtractFilePath(ParamStr(0));
         image1.Picture.LoadFromFile(path+ 'media\' + 'red.jpg');
              label3.caption := '0';
                  report1 := '<font color=blue>' + label5.caption + ' = ' + '<font color=red>' + label8.caption +'</font><br><br>';
                     combobox2.Items.Add (report1);
                        report2 := '<font color=blue>Other Friends = ' + '<font color=red>' + label9.caption + '</font><br><br>' + #10#13 + '</HTML>';
                            combobox2.Items.Add (report2);
                               combobox2.Items.SaveToFile(path + 'html\' + fname);
                                  listbox1.Items.SaveToFile(path + 'lists\' + edit1.Text + '.rba');
                                    webbrowser1.Navigate (path + 'html\' + fname);
                                      end;


procedure TFormSort.FormCreate(Sender: TObject);
var
        fname,path : string;
begin
  fname := 'all.rba';
     path := ExtractFilePath(ParamStr(0));
       if fileexists (path + 'lists\' + fname) then
         combobox1.Items.LoadFromFile(path + 'lists\' + fname);
           combobox1.ItemIndex := 0;
             label7.caption := inttostr(combobox1.Items.count);
                if fileexists (path + 'html\' + 'report.html') then
                   combobox2.Items.LoadFromFile(path + 'html\' + 'report.html');
                     progressbar1.Max := combobox1.Items.count -1;
                     end;

procedure TFormSort.Start(Sender: TObject);
var
path : string;
  begin
    if edit1.text= '' then
      exit;

path := ExtractFilePath(ParamStr(0))+'media\';
   if fileexists (path+'green.jpg') then
     image1.Picture.LoadFromFile(path+'green.jpg');
        edit1.enabled := false;
          label3.Caption := '1';
            sortclick(sender);
           end;

{
procedure TFormSort.SortClick(Sender: TObject);
var
        s,t,x,path,fname,internetFile,localFileName : string;
        progress : integer;
          begin

            if combobox1.ItemIndex = combobox1.Items.count -1 then
              exit;
                combobox1.ItemIndex := combobox1.ItemIndex + 1;
                  progress := (combobox1.itemindex); // div combobox1.Items.count) * 100;
                    progressbar1.position := (progress);
                      //showmessage (inttostr(progress)+ ' ' + '%');
                      fname := 'data.txt';
                        path := ExtractFilePath(ParamStr(0));
                          t:= AnsiUpperCase(edit1.Text);
                            label5.caption := t + ' ' + 'Friends';
                              label2.Caption := t;
                                label3.caption := '1';
                 s:= combobox1.Items[combobox1.itemindex];
                   internetFile := 'http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s;
                      localFileName := (path + Fname);
                         if GetInetFile(internetFile, localFileName) then
                            memo1.lines.LoadFromFile(localfilename)
        else
           showmessage(path+fname + 'Not found');
             if label3.caption = '0' then
               exit;
                 formsort.Refresh;
                   progressbar1.Refresh;
                     combobox1.Refresh;
                       find(Sender);
       end;
                          }

procedure TFormSort.SortClick(Sender: TObject);
var
        s,t,path,fname,internetFile,localFileName : string;
        i,progress : integer;
        x : extended;
          begin
                if combobox1.ItemIndex = combobox1.items.count -1 then
                  begin
                    Com2save(Sender);
                      exit;
                        end;
                combobox1.ItemIndex := combobox1.ItemIndex + 1;
                  progress := (combobox1.itemindex);
                    progressbar1.position := (progress);
                      x:= (combobox1.itemindex / combobox1.Items.count) * 100;
                        label11.Caption := (inttostr(round(x))) + ' ' + '%' + ' ' + 'complete';
                         fname := 'data.txt';
                           path := ExtractFilePath(ParamStr(0));
                             t:= AnsiUpperCase(edit1.Text);
                               label5.caption := t + ' ' + 'Friends';
                                 label2.Caption := t;
                                   label3.caption := '1';
                 s:= combobox1.Items[combobox1.itemindex];
                   internetFile := 'http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s;
                      localFileName := (path + Fname);
                         if GetInetFile(internetFile, localFileName) then
                            memo1.lines.LoadFromFile(localfilename)
        else
           showmessage(path+fname + 'Not found');
             if label3.caption = '0' then
               exit;

        find(sender);
       end;


procedure TFormSort.StopClick(Sender: TObject);
var
path : string;
     begin
     edit1.Enabled := true;
        path := ExtractFilePath(ParamStr(0))+'media\';
           label3.caption := '0';
              if fileexists (path+'red.jpg') then
                image1.Picture.LoadFromFile(path+'red.jpg');

                  end;


procedure TFormSort.ListBox1Click(Sender: TObject);
var
        s,path: string;
          begin
            edit1.Enabled := true;
              path := ExtractFilePath(ParamStr(0))+'media\';
               label3.caption := '0';
                  if fileexists (path+'red.jpg') then
                    image1.Picture.LoadFromFile(path+'red.jpg');
                       s:= (listbox1.Items[listbox1.itemindex]);
                         webbrowser1.Navigate('http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s);
                            end;

procedure TFormSort.ListBox2Click(Sender: TObject);
var
        s,path: string;
           begin
             edit1.Enabled := true;
              path := ExtractFilePath(ParamStr(0))+'media\';
               label3.caption := '0';
                 if fileexists (path + 'red.jpg') then
                   image1.Picture.LoadFromFile(path+'red.jpg');
                     s:= (listbox2.Items[listbox2.itemindex]);
                       webbrowser1.Navigate('http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s);
                         end;



procedure TFormSort.Button1Click(Sender: TObject);
begin
FormSort.Close;
end;



procedure TFormSort.Find(Sender: TObject);
var
  g,t: string;
    begin
         t:= ansilowercase(memo1.text);
           g:= ansilowercase(edit1.Text);
             if pos (g,t)>0 then
begin
  listbox1.items.add (combobox1.items[combobox1.itemindex]);
    label8.caption := inttostr(strtoint(label8.caption) + 1);
      end
else
begin
  listbox2.items.add (combobox1.items[combobox1.itemindex]);
    label9.caption := inttostr(strtoint(label9.caption) + 1);
      end;
      formsort.Refresh;
      combobox1.Refresh;
      progressbar1.Refresh;
      SortClick(Sender);
        end;
     
end.

// Thankks in advance for any assistance
0
Comment
Question by:Mark Brady
  • 6
  • 5
11 Comments
 
LVL 10

Expert Comment

by:dinilud
ID: 19637099
if you don't mind please include dfm file
0
 
LVL 20

Author Comment

by:Mark Brady
ID: 19637158
ok here is the form.....

object FormSort: TFormSort
  Left = 195
  Top = 54
  Width = 718
  Height = 649
  Caption = 'Sort Friends'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 264
    Top = 408
    Width = 26
    Height = 13
    Caption = 'Other'
  end
  object Label2: TLabel
    Left = 16
    Top = 408
    Width = 44
    Height = 13
    Caption = 'Selection'
  end
  object Label3: TLabel
    Left = 200
    Top = 524
    Width = 6
    Height = 13
    Caption = '0'
  end
  object Label10: TLabel
    Left = 16
    Top = 8
    Width = 112
    Height = 13
    Caption = 'Enter the search criteria'
  end
  object Bevel1: TBevel
    Left = 192
    Top = 19
    Width = 201
    Height = 30
    Shape = bsFrame
  end
  object Image1: TImage
    Left = 176
    Top = 424
    Width = 50
    Height = 100
    Picture.Data = {
      0A544A504547496D61676520330000FFD8FFE000104A4649460001020100B400
      B40000FFE107754578696600004D4D002A000000080007011200030000000100
      010000011A00050000000100000062011B0005000000010000006A0128000300
      00000100020000013100020000001B0000007201320002000000140000008D87
      69000400000001000000A4000000D0000000B400000001000000B40000000141
      646F62652050686F746F73686F702043532057696E646F777300323030373A30
      373A32362032323A33323A3130000000000003A001000300000001FFFF0000A0
      0200040000000100000032A00300040000000100000064000000000000000601
      0300030000000100060000011A0005000000010000011E011B00050000000100
      00012601280003000000010002000002010004000000010000012E0202000400
      0000010000063F0000000000000048000000010000004800000001FFD8FFE000
      104A46494600010201004800480000FFED000C41646F62655F434D0002FFEE00
      0E41646F626500648000000001FFDB0084000C08080809080C09090C110B0A0B
      11150F0C0C0F1518131315131318110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010D0B0B0D0E0D100E0E10140E0E
      0E14140E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC00011080064003203012200
      021101031101FFDD00040004FFC4013F00000105010101010101000000000000
      00030001020405060708090A0B01000105010101010101000000000000000100
      02030405060708090A0B1000010401030204020507060805030C330100021103
      04211231054151611322718132061491A1B14223241552C16233347282D14307
      259253F0E1F163733516A2B283264493546445C2A3743617D255E265F2B384C3
      D375E3F3462794A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6E6F6
      37475767778797A7B7C7D7E7F711000202010204040304050607070605350100
      021103213112044151617122130532819114A1B14223C152D1F0332462E17282
      92435315637334F1250616A2B283072635C2D2449354A317644555367465E2F2
      B384C3D375E3F34694A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6
      E6F62737475767778797A7B7C7FFDA000C03010002110311003F00F3DEA7D4FA
      933A965B19977358DBAC0D68B1C0001CE86B46E55BF6AF54FF00B997FF00DBAF
      FF00C925D57FE54CCFF8FB7FEADCA7D33A5DFD42DD8CF6B1BABDE74007894090
      05948049000B2740030FDABD53FEE65FFF006EBFFF002497ED5EA9FF00732FFF
      00B75FFF00925D253D2FA4E33768A8E43FBBDE61BF267D2527E174BB46DB3143
      27F3AB2411FD97EE501E6F15D59F374E3F01F884A1C7ED01D784CA227FE2BCCF
      ED5EA9FF00732FFF00B75FFF00924BF6AF54FF00B997FF00DBAFFF00C92BBD5B
      A13B119F68C777AB8E4C6EEE0FEEBC2C853C64242C1B0E6E4C73C73309C4C271
      3528CB421EBBED795FE9ACFF00917D6FA47F9CFF004DCFF3BFF089217FF20924
      56BFFFD0F34EAA27AAE60F1C8B3FEADCBA8C4A1B89D3E9A1A21D6B45969F19FA
      0D5CC75331D5F2CF86459FF56E5D5BC87D7458DD5AFA9847C86CFF00BEAADCE1
      2318AEA75767FE2EE384F9EB9EA61094E1FDFF004C7FE8C98A4924B39ED1251B
      5CE34D9AD570D8F1F1FA2EFEC2E3B3B1CE365DB49FCC710BAFA985F631839710
      3EF5CBF5CB1B6F54C87B782F31F7ABBC913EA1D34794FF008CF8E032E098F9E7
      1909FF00761C3C1FF4A4EDFF00F20924BFF90492BAF3AFFFD1F34EABFF002A66
      7FC7DBFF0056E5B3D0BA95575030321E18E699A5E7893CB1DFC972C6EABFF2A6
      67FC7DBFF56E554120C83053670138989EACBCBE7C9832C72E23C3381B1FC0BD
      B595BEB30F6C1EDE07E0A2017101A092780173B8BF583A96333D36D9B99FBAED
      47DCE44B3EB37537B0B18E6D40F3E980DFFA9854CF252BD2429E8E3FF1A23C1E
      AE5CFB9E13F47FD176B3F36BE99438B9C0E5BC16B183F301D0B9DFCA5C83DC5E
      E2E7724C94F65B65AE2EB1C5CE3DCA8AB58B10C71A1F52E073BCE65E6F31CB97
      7DA311F2C23FBB17A9FF00E412497FF209252359FFD2F34EABFF002A667FC7DB
      FF0056E5555AEABFF2A667FC7DBFF56E43A69DC373B46849485282AE0F4DBA35
      808F34A5879608F294DE30B78E2D34958B286905D5F6E42AE9C0DAE06DEA7FF9
      04925FFC8249253FFFD3F35EA827AAE60FFBB16FFD5B949DA06B07007E551EA7
      FF002B65FF00E18B3FEADCA566AEF90FC8993D964F66292492631AED3B483CF8
      855EF6ECB484742CB337393E1D5931F57A3FFE412497FF0020924F5EFF00FFD4
      F34EABFF002AE67FC7DBFF0056E4F5BC58C03F39BDBC426EABFF002A667FC7DB
      FF0056E55838B4C8408B411629B441060F29210CA7F701D1E22539CB7766807C
      40099C0567B7E2987E8C6F7691F4478954DEEDCE253BEC73CCB8A8A7814BC0A0
      F53FFC82492FFE41248A5FFFD5E1BA87FCDCFB7E4FADF6DF57D57FA9B3D2DBBB
      73B7ECDDEED9B957FF00B16FFBBFFF0080ACB49253A9FF0062DFF77FFF00014B
      FEC5BFEEFF00FE02B2D2494EA7FD8B7FDDFF00FC052FFB16FF00BBFF00F80ACB
      49253D9FF92FFE1FFE49FE47F46FFDEAFF00C0525C624929FFD9FFED0C405068
      6F746F73686F7020332E30003842494D04250000000000100000000000000000
      00000000000000003842494D03ED00000000001000B400000001000100B40000
      000100013842494D042600000000000E000000000000000000003F8000003842
      494D040D000000000004000000783842494D04190000000000040000001E3842
      494D03F3000000000009000000000000000001003842494D040A000000000001
      00003842494D271000000000000A000100000000000000023842494D03F50000
      00000048002F66660001006C66660006000000000001002F6666000100A1999A
      0006000000000001003200000001005A00000006000000000001003500000001
      002D000000060000000000013842494D03F80000000000700000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFF03E800003842494D040000000000000200023842494D040200000000
      00060000000000003842494D0408000000000010000000010000024000000240
      000000003842494D041E000000000004000000003842494D041A000000000349
      00000006000000000000000000000064000000320000000A0055006E00740069
      0074006C00650064002D00310000000100000000000000000000000000000000
      0000000100000000000000000000003200000064000000000000000000000000
      0000000001000000000000000000000000000000000000001000000001000000
      0000006E756C6C0000000200000006626F756E64734F626A6300000001000000
      000000526374310000000400000000546F70206C6F6E6700000000000000004C
      6566746C6F6E67000000000000000042746F6D6C6F6E67000000640000000052
      6768746C6F6E670000003200000006736C69636573566C4C73000000014F626A
      6300000001000000000005736C6963650000001200000007736C69636549446C
      6F6E67000000000000000767726F757049446C6F6E6700000000000000066F72
      6967696E656E756D0000000C45536C6963654F726967696E0000000D6175746F
      47656E6572617465640000000054797065656E756D0000000A45536C69636554
      79706500000000496D672000000006626F756E64734F626A6300000001000000
      000000526374310000000400000000546F70206C6F6E6700000000000000004C
      6566746C6F6E67000000000000000042746F6D6C6F6E67000000640000000052
      6768746C6F6E67000000320000000375726C5445585400000001000000000000
      6E756C6C54455854000000010000000000004D73676554455854000000010000
      00000006616C74546167544558540000000100000000000E63656C6C54657874
      497348544D4C626F6F6C010000000863656C6C54657874544558540000000100
      0000000009686F727A416C69676E656E756D0000000F45536C696365486F727A
      416C69676E0000000764656661756C740000000976657274416C69676E656E75
      6D0000000F45536C69636556657274416C69676E0000000764656661756C7400
      00000B6267436F6C6F7254797065656E756D0000001145536C6963654247436F
      6C6F7254797065000000004E6F6E6500000009746F704F75747365746C6F6E67
      000000000000000A6C6566744F75747365746C6F6E67000000000000000C626F
      74746F6D4F75747365746C6F6E67000000000000000B72696768744F75747365
      746C6F6E6700000000003842494D042800000000000C000000013FF000000000
      00003842494D041100000000000101003842494D041400000000000400000006
      3842494D040C00000000065B0000000100000032000000640000009800003B60
      0000063F00180001FFD8FFE000104A46494600010201004800480000FFED000C
      41646F62655F434D0002FFEE000E41646F626500648000000001FFDB0084000C
      08080809080C09090C110B0A0B11150F0C0C0F1518131315131318110C0C0C0C
      0C0C110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C01
      0D0B0B0D0E0D100E0E10140E0E0E14140E0E0E0E14110C0C0C0C0C11110C0C0C
      0C0C0C110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
      FFC00011080064003203012200021101031101FFDD00040004FFC4013F000001
      0501010101010100000000000000030001020405060708090A0B010001050101
      0101010100000000000000010002030405060708090A0B100001040103020402
      0507060805030C33010002110304211231054151611322718132061491A1B142
      23241552C16233347282D14307259253F0E1F163733516A2B283264493546445
      C2A3743617D255E265F2B384C3D375E3F3462794A485B495C4D4E4F4A5B5C5D5
      E5F55666768696A6B6C6D6E6F637475767778797A7B7C7D7E7F7110002020102
      04040304050607070605350100021103213112044151617122130532819114A1
      B14223C152D1F0332462E1728292435315637334F1250616A2B283072635C2D2
      449354A317644555367465E2F2B384C3D375E3F34694A485B495C4D4E4F4A5B5
      C5D5E5F55666768696A6B6C6D6E6F62737475767778797A7B7C7FFDA000C0301
      0002110311003F00F3DEA7D4FA933A965B19977358DBAC0D68B1C0001CE86B46
      E55BF6AF54FF00B997FF00DBAFFF00C925D57FE54CCFF8FB7FEADCA7D33A5DFD
      42DD8CF6B1BABDE7400789409005948049000B2740030FDABD53FEE65FFF006E
      BFFF002497ED5EA9FF00732FFF00B75FFF00925D253D2FA4E33768A8E43FBBDE
      61BF267D2527E174BB46DB314327F3AB2411FD97EE501E6F15D59F374E3F01F8
      84A1C7ED01D784CA227FE2BCCFED5EA9FF00732FFF00B75FFF00924BF6AF54FF
      00B997FF00DBAFFF00C92BBD5BA13B119F68C777AB8E4C6EEE0FEEBC2C853C64
      242C1B0E6E4C73C73309C4C2713528CB421EBBED795FE9ACFF00917D6FA47F9C
      FF004DCFF3BFF089217FF2092456BFFFD0F34EAA27AAE60F1C8B3FEADCBA8C4A
      1B89D3E9A1A21D6B45969F19FA0D5CC75331D5F2CF86459FF56E5D5BC87D7458
      DD5AFA9847C86CFF00BEAADCE12318AEA75767FE2EE384F9EB9EA61094E1FDFF
      004C7FE8C98A4924B39ED1251B5CE34D9AD570D8F1F1FA2EFEC2E3B3B1CE365D
      B49FCC710BAFA985F6318397103EF5CBF5CB1B6F54C87B782F31F7ABBC913EA1
      D34794FF008CF8E032E098F9E71909FF00761C3C1FF4A4EDFF00F20924BFF904
      92BAF3AFFFD1F34EABFF002A667FC7DBFF0056E5B3D0BA95575030321E18E699
      A5E7893CB1DFC972C6EABFF2A667FC7DBFF56E554120C83053670138989EACBC
      BE7C9832C72E23C3381B1FC0BDB595BEB30F6C1EDE07E0A2017101A092780173
      B8BF583A96333D36D9B99FBAED47DCE44B3EB37537B0B18E6D40F3E980DFFA98
      54CF252BD2429E8E3FF1A23C1EAE5CFB9E13F47FD176B3F36BE99438B9C0E5BC
      16B183F301D0B9DFCA5C83DC5EE2E7724C94F65B65AE2EB1C5CE3DCA8AB58B10
      C71A1F52E073BCE65E6F31CB977DA311F2C23FBB17A9FF00E412497FF2092523
      59FFD2F34EABFF002A667FC7DBFF0056E5555AEABFF2A667FC7DBFF56E43A69D
      C373B46849485282AE0F4DBA35808F34A5879608F294DE30B78E2D34958B2869
      05D5F6E42AE9C0DAE06DEA7FF904925FFC8249253FFFD3F35EA827AAE60FFBB1
      6FFD5B949DA06B07007E551EA7FF002B65FF00E18B3FEADCA566AEF90FC8993D
      964F66292492631AED3B483CF8855EF6ECB484742CB337393E1D5931F57A3FFE
      412497FF0020924F5EFF00FFD4F34EABFF002AE67FC7DBFF0056E4F5BC58C03F
      39BDBC426EABFF002A667FC7DBFF0056E55838B4C8408B411629B441060F2921
      0CA7F701D1E22539CB7766807C40099C0567B7E2987E8C6F7691F4478954DEED
      CE253BEC73CCB8A8A7814BC0A0F53FFC82492FFE41248A5FFFD5E1BA87FCDCFB
      7E4FADF6DF57D57FA9B3D2DBBB73B7ECDDEED9B957FF00B16FFBBFFF0080ACB4
      9253A9FF0062DFF77FFF00014BFEC5BFEEFF00FE02B2D2494EA7FD8B7FDDFF00
      FC052FFB16FF00BBFF00F80ACB49253D9FF92FFE1FFE49FE47F46FFDEAFF00C0
      525C624929FFD9003842494D042100000000005300000001010000000F004100
      64006F00620065002000500068006F0074006F00730068006F00700000001200
      410064006F00620065002000500068006F0074006F00730068006F0070002000
      43005300000001003842494D04060000000000070004010100030100FFE11804
      687474703A2F2F6E732E61646F62652E636F6D2F7861702F312E302F003C3F78
      7061636B657420626567696E3D27EFBBBF272069643D2757354D304D70436568
      69487A7265537A4E54637A6B633964273F3E0A3C783A786D706D65746120786D
      6C6E733A783D2761646F62653A6E733A6D6574612F2720783A786D70746B3D27
      584D5020746F6F6C6B697420332E302D32382C206672616D65776F726B20312E
      36273E0A3C7264663A52444620786D6C6E733A7264663D27687474703A2F2F77
      77772E77332E6F72672F313939392F30322F32322D7264662D73796E7461782D
      6E73232720786D6C6E733A69583D27687474703A2F2F6E732E61646F62652E63
      6F6D2F69582F312E302F273E0A0A203C7264663A4465736372697074696F6E20
      7264663A61626F75743D27757569643A37373330326164662D336236332D3131
      64632D623564322D666335343963383638633465270A2020786D6C6E733A6578
      69663D27687474703A2F2F6E732E61646F62652E636F6D2F657869662F312E30
      2F273E0A20203C657869663A436F6C6F7253706163653E343239343936373239
      353C2F657869663A436F6C6F7253706163653E0A20203C657869663A50697865
      6C5844696D656E73696F6E3E35303C2F657869663A506978656C5844696D656E
      73696F6E3E0A20203C657869663A506978656C5944696D656E73696F6E3E3130
      303C2F657869663A506978656C5944696D656E73696F6E3E0A203C2F7264663A
      4465736372697074696F6E3E0A0A203C7264663A4465736372697074696F6E20
      7264663A61626F75743D27757569643A37373330326164662D336236332D3131
      64632D623564322D666335343963383638633465270A2020786D6C6E733A7064
      663D27687474703A2F2F6E732E61646F62652E636F6D2F7064662F312E332F27
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A446573
      6372697074696F6E207264663A61626F75743D27757569643A37373330326164
      662D336236332D313164632D623564322D666335343963383638633465270A20
      20786D6C6E733A70686F746F73686F703D27687474703A2F2F6E732E61646F62
      652E636F6D2F70686F746F73686F702F312E302F273E0A20203C70686F746F73
      686F703A486973746F72793E3C2F70686F746F73686F703A486973746F72793E
      0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A44657363
      72697074696F6E207264663A61626F75743D27757569643A3737333032616466
      2D336236332D313164632D623564322D666335343963383638633465270A2020
      786D6C6E733A746966663D27687474703A2F2F6E732E61646F62652E636F6D2F
      746966662F312E302F273E0A20203C746966663A4F7269656E746174696F6E3E
      313C2F746966663A4F7269656E746174696F6E3E0A20203C746966663A585265
      736F6C7574696F6E3E3138302F313C2F746966663A585265736F6C7574696F6E
      3E0A20203C746966663A595265736F6C7574696F6E3E3138302F313C2F746966
      663A595265736F6C7574696F6E3E0A20203C746966663A5265736F6C7574696F
      6E556E69743E323C2F746966663A5265736F6C7574696F6E556E69743E0A203C
      2F7264663A4465736372697074696F6E3E0A0A203C7264663A44657363726970
      74696F6E207264663A61626F75743D27757569643A37373330326164662D3362
      36332D313164632D623564322D666335343963383638633465270A2020786D6C
      6E733A7861703D27687474703A2F2F6E732E61646F62652E636F6D2F7861702F
      312E302F273E0A20203C7861703A437265617465446174653E323030372D3037
      2D32365432323A33323A31302B31323A30303C2F7861703A4372656174654461
      74653E0A20203C7861703A4D6F64696679446174653E323030372D30372D3236
      5432323A33323A31302B31323A30303C2F7861703A4D6F64696679446174653E
      0A20203C7861703A4D65746164617461446174653E323030372D30372D323654
      32323A33323A31302B31323A30303C2F7861703A4D6574616461746144617465
      3E0A20203C7861703A43726561746F72546F6F6C3E41646F62652050686F746F
      73686F702043532057696E646F77733C2F7861703A43726561746F72546F6F6C
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A446573
      6372697074696F6E207264663A61626F75743D27757569643A37373330326164
      662D336236332D313164632D623564322D666335343963383638633465270A20
      20786D6C6E733A7861704D4D3D27687474703A2F2F6E732E61646F62652E636F
      6D2F7861702F312E302F6D6D2F273E0A20203C7861704D4D3A446F63756D656E
      7449443E61646F62653A646F6369643A70686F746F73686F703A373733303261
      64652D336236332D313164632D623564322D6663353439633836386334653C2F
      7861704D4D3A446F63756D656E7449443E0A203C2F7264663A44657363726970
      74696F6E3E0A0A203C7264663A4465736372697074696F6E207264663A61626F
      75743D27757569643A37373330326164662D336236332D313164632D62356432
      2D666335343963383638633465270A2020786D6C6E733A64633D27687474703A
      2F2F7075726C2E6F72672F64632F656C656D656E74732F312E312F273E0A2020
      3C64633A666F726D61743E696D6167652F6A7065673C2F64633A666F726D6174
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A3C2F7264663A524446
      3E0A3C2F783A786D706D6574613E0A2020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020200A202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020200A20202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020202020200A2020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20200A2020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020200A202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020200A20202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020200A2020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020200A202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020200A20202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      0A20202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020200A2020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020200A202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020200A20202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020200A2020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020200A202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020200A20
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020200A20202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020200A2020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020200A202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020200A20202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020200A2020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020202020200A202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      200A202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020200A20202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020200A2020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020200A202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020200A20202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020200A2020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020202020202020200A
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020200A202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020200A20202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020200A2020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020200A202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020200A20202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020202020200A2020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20200A2020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020200A202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020200A20202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020200A2020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020200A202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020200A3C3F787061636B657420656E643D277727
      3F3EFFEE002641646F6265006400000000010300150403060A0D000000000000
      00000000000000000000FFDB0084000604040405040605050609060506090B08
      0606080B0C0A0A0B0A0A0C100C0C0C0C0C0C100C0C0C0C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010707070D0C0D18101018140E0E0E1414
      0E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC20011080064003203011100021101
      031101FFC400D000000105010100000000000000000000000002030405060107
      0101000203010100000000000000000000000102030405060710000103030205
      0207010000000000000001000204101103203430121314252131405022322324
      0515110000030504080603000000000000000000010211B11272031031518420
      21613292A23343417122421334A1D25312000102030900000000000000000000
      002100011020305060618191A1B1C11213010001020503050101010000000000
      0001110021102031415130F061718191B1C1A1D1E1FFDA000C03010302110311
      000001F3D2300001A43362EB7D0E9FA05572D2EDF02A32EB6A8A0351CFF51DD7
      EF83B7D2C7753C2E8A5426AF99ECD18BA80B532FD6F9DDDD9405CEB74ECF43D8
      A566F6BCDE437BCEEA0A0229634BB916ACBE244B5450110E81C0354500D443F4
      A0376B47B5B52500AC58B9150EA63E5CDA59508AC58931500672E7D24A80ED28
      53182AD7879326A0A0228F44760D4CA25AA2111C0000BF3FFFDA000801010001
      050293264091DD4A5DD4A5DD4A5DD4A5DD4A5D5CAA56EA3457E77322C5C68E18
      AE52A09C6292B758983147A32C567674F2A93BB3EADA345DD39C1D294ADD4192
      D730B48A67CCD8EC26E54ADD2C7FD0938C3BFA7248739CE3495BAD52B74D65D7
      D2BD13982B2B746A13C59CA4EECFBD72FDEA56E9A79853D91372A56E9754AEA9
      45C4D647F9DD7F16BC5AF16BC5AF16BF557FFFDA0008010200010502E0128E45
      D44D75F464350743FDEA2AF6D58DD365CBC5BFCA3FFFDA0008010300010502E0
      0174C809D002C988B0D60E3F4A67C7CCDAC33F8E8E36158D9F90B5C0D2549BE9
      0E211793C5BABE93ACEB351F03FFDA0008010202063F02BB7FFFDA0008010302
      063F02A27641F5464F51E29E0E843CB66FD4C4DABFFFDA0008010101063F02AA
      45556444B530A23C47597C463ACBE231D65F118EB2F88C7597C4637CFE9C57FB
      B1F3DA2B4EA78615DE2637633C4C7AA9B36A446838A9D992156753C21057ABD4
      AB613DD56A30A4E03242ACEA7842BC0D25691622A19623242B4EA78F8566C32D
      C31AEC3FEA771601A3242B4EA7D8C2534B030C2387CB5069EBB3242B4EA7E964
      8569D4F0D3B85C2E0D2B3242ACEA78668E48559D4FD2C90AD3A9E3695AD3B324
      2B4EA7E9648548BE68A238990B1AD1DFE51DFE51DFE51DFE51DFE51EFF00ABB3
      A7FB7E07FFDA0008010103013F213EC000002B17AEE5FDAEE5FDAEE5FDAEE5FD
      AEE5FDAFF4576BDD5DCB9D6954DDF40A0A0E55A3E35FAA3607C88FE33F757963
      7DCF0E3BBBEBEAD8012FD1FB8C86FD9FD747DABCAA8C3DCB9D200D93D88FCC5C
      8DC15A012B0F72E745F5D174F47C34DC18A05602576A765938F3B77CF8A645AB
      87B973A1464AF98C43FB49001D627D2A50C9E71F72E79FDCB9D44D0A59A7CAA7
      71A51C3A98FB773AB0381F78A866A60C3DDB9D7D47D64D4C3DCB9D40989F1B42
      AF187B973A14D28DDBFAD7101ED4C5F1FEBDC8989BC4E939C924ABFFDA000801
      0203013F21E8414BB50A8722563189A31191A319E930DD72A5A01D45C134391C
      EE4314C432C5474FFFDA0008010303013F21E83A82EBA156AF8F1FE9FF002A0D
      C1F43F51514F63B3E9904E46C780D7E5C4DCDCBFA8FF0074C930F0A3F33FB8C8
      2EC4FC64D5BCDE3CD0B2A4F14B144357B21FB974853D18FAAD78FA95FBEBE339
      C64D59C6233474FF00FFDA000C0301030211031100001000000006C821B48025
      AF811580092A8040240289409D2480092C01E800256A0124927FFFDA00080101
      03013F100B244A08020019B264C9932772BEE61725876D405AAB415A65CAEF83
      A3D5A5CB5DC23FAA97DED1121787671983C8500C418355666F018A25C391A6CF
      737A74ED3FC1C281DD06A19D94F86B4F9C560E4478975AD962BE71E412687472
      EB513F2DB93A2722593D28F3AC004ABE8504344A8A443070D28BCCAAAFAE3C80
      121344A2111DBFE52AB4DB2ECF814C9774AA72F24350F197927120DF9F051A26
      9CCD5F84A56D077891FB699CBC9D4FF9490C61127CD208B2027D5138C3C24353
      91B34676CE358C64760C8C61E5C2A1A90652D407278F4A4451212C8E021D0D4D
      AAECD222DF1E476543460891B081B7BD3B8868806A4CE7A54AA0C8B6DB43FFDA
      0008010203013F10E8199698D947D680B644E118B934A4C605884B142CC60C9A
      D20C383AE535E2B46283A7052AA752E477C468C757494D4644D4683A5FFFDA00
      08010303013F10E81F3A44929D5C576A1D958D790CC517F1D06416B2502035C6
      9C741350E3325F4581C6A0095829EAC1CB25659F3543C751B4A052B6A950E43B
      C62A19E9D3DCC6ECE541A871D3FFD9}
  end
  object Label11: TLabel
    Left = 616
    Top = 320
    Width = 6
    Height = 13
    Caption = '0'
  end
  object Sort: TButton
    Left = 200
    Top = 24
    Width = 75
    Height = 20
    Caption = 'Sort'
    TabOrder = 0
    OnClick = Start
  end
  object ListBox1: TListBox
    Left = 16
    Top = 424
    Width = 121
    Height = 177
    AutoComplete = False
    ExtendedSelect = False
    ItemHeight = 13
    TabOrder = 1
    OnClick = ListBox1Click
  end
  object ListBox2: TListBox
    Left = 264
    Top = 424
    Width = 121
    Height = 177
    AutoComplete = False
    ExtendedSelect = False
    ItemHeight = 13
    TabOrder = 2
    OnClick = ListBox2Click
  end
  object Stop: TButton
    Left = 308
    Top = 24
    Width = 75
    Height = 20
    Caption = 'Stop'
    TabOrder = 3
    OnClick = StopClick
  end
  object Edit1: TEdit
    Left = 16
    Top = 24
    Width = 153
    Height = 21
    TabOrder = 4
  end
  object Panel1: TPanel
    Left = 16
    Top = 288
    Width = 377
    Height = 89
    BorderStyle = bsSingle
    Color = clGray
    TabOrder = 5
    object Label4: TLabel
      Left = 8
      Top = 12
      Width = 61
      Height = 13
      Caption = 'Total Friends'
    end
    object Label5: TLabel
      Left = 8
      Top = 36
      Width = 34
      Height = 13
      Caption = 'Friends'
    end
    object Label6: TLabel
      Left = 8
      Top = 60
      Width = 63
      Height = 13
      Caption = 'Other Friends'
    end
    object Label7: TLabel
      Left = 192
      Top = 12
      Width = 6
      Height = 13
      Caption = '0'
    end
    object Label8: TLabel
      Left = 192
      Top = 36
      Width = 6
      Height = 13
      Caption = '0'
    end
    object Label9: TLabel
      Left = 192
      Top = 60
      Width = 6
      Height = 13
      Caption = '0'
    end
  end
  object ComboBox1: TComboBox
    Left = 136
    Top = 392
    Width = 121
    Height = 21
    ItemHeight = 13
    TabOrder = 6
    Text = 'ComboBox1'
  end
  object ComboBox2: TComboBox
    Left = 256
    Top = 320
    Width = 113
    Height = 21
    ItemHeight = 13
    TabOrder = 7
    Text = 'ComboBox2'
    Visible = False
  end
  object Button1: TButton
    Left = 160
    Top = 552
    Width = 81
    Height = 41
    Caption = 'Finished'
    TabOrder = 8
    OnClick = Button1Click
  end
  object WebBrowser1: TWebBrowser
    Left = 16
    Top = 56
    Width = 377
    Height = 217
    TabOrder = 9
    ControlData = {
      4C000000F72600006D1600000000000000000000000000000000000000000000
      000000004C000000000000000000000001000000E0D057007335CF11AE690800
      2B2E126208000000000000004C0000000114020000000000C000000000000046
      8000000000000000000000000000000000000000000000000000000000000000
      00000000000000000100000000000000000000000000000000000000}
  end
  object Memo1: TMemo
    Left = 408
    Top = 56
    Width = 281
    Height = 225
    Lines.Strings = (
      'Memo1')
    ScrollBars = ssBoth
    TabOrder = 10
    WordWrap = False
  end
  object ProgressBar1: TProgressBar
    Left = 408
    Top = 296
    Width = 281
    Height = 17
    Min = 0
    Max = 100
    Step = 1
    TabOrder = 11
  end
end
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Accepted Solution

by:
dinilud earned 1000 total points
ID: 19637884
Unit1.dfm
==========

object FormSort: TFormSort
  Left = 2
  Top = -24
  Width = 707
  Height = 612
  Caption = 'Sort Friends'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 264
    Top = 398
    Width = 26
    Height = 13
    Caption = 'Other'
  end
  object Label2: TLabel
    Left = 16
    Top = 398
    Width = 44
    Height = 13
    Caption = 'Selection'
  end
  object Label3: TLabel
    Left = 197
    Top = 516
    Width = 6
    Height = 13
    Caption = '0'
  end
  object Label10: TLabel
    Left = 16
    Top = 8
    Width = 112
    Height = 13
    Caption = 'Enter the search criteria'
  end
  object Bevel1: TBevel
    Left = 192
    Top = 19
    Width = 201
    Height = 30
    Shape = bsFrame
  end
  object Image1: TImage
    Left = 176
    Top = 414
    Width = 50
    Height = 100
    Picture.Data = {
      0A544A504547496D61676520330000FFD8FFE000104A4649460001020100B400
      B40000FFE107754578696600004D4D002A000000080007011200030000000100
      010000011A00050000000100000062011B0005000000010000006A0128000300
      00000100020000013100020000001B0000007201320002000000140000008D87
      69000400000001000000A4000000D0000000B400000001000000B40000000141
      646F62652050686F746F73686F702043532057696E646F777300323030373A30
      373A32362032323A33323A3130000000000003A001000300000001FFFF0000A0
      0200040000000100000032A00300040000000100000064000000000000000601
      0300030000000100060000011A0005000000010000011E011B00050000000100
      00012601280003000000010002000002010004000000010000012E0202000400
      0000010000063F0000000000000048000000010000004800000001FFD8FFE000
      104A46494600010201004800480000FFED000C41646F62655F434D0002FFEE00
      0E41646F626500648000000001FFDB0084000C08080809080C09090C110B0A0B
      11150F0C0C0F1518131315131318110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010D0B0B0D0E0D100E0E10140E0E
      0E14140E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC00011080064003203012200
      021101031101FFDD00040004FFC4013F00000105010101010101000000000000
      00030001020405060708090A0B01000105010101010101000000000000000100
      02030405060708090A0B1000010401030204020507060805030C330100021103
      04211231054151611322718132061491A1B14223241552C16233347282D14307
      259253F0E1F163733516A2B283264493546445C2A3743617D255E265F2B384C3
      D375E3F3462794A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6E6F6
      37475767778797A7B7C7D7E7F711000202010204040304050607070605350100
      021103213112044151617122130532819114A1B14223C152D1F0332462E17282
      92435315637334F1250616A2B283072635C2D2449354A317644555367465E2F2
      B384C3D375E3F34694A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6
      E6F62737475767778797A7B7C7FFDA000C03010002110311003F00F3DEA7D4FA
      933A965B19977358DBAC0D68B1C0001CE86B46E55BF6AF54FF00B997FF00DBAF
      FF00C925D57FE54CCFF8FB7FEADCA7D33A5DFD42DD8CF6B1BABDE74007894090
      05948049000B2740030FDABD53FEE65FFF006EBFFF002497ED5EA9FF00732FFF
      00B75FFF00925D253D2FA4E33768A8E43FBBDE61BF267D2527E174BB46DB3143
      27F3AB2411FD97EE501E6F15D59F374E3F01F884A1C7ED01D784CA227FE2BCCF
      ED5EA9FF00732FFF00B75FFF00924BF6AF54FF00B997FF00DBAFFF00C92BBD5B
      A13B119F68C777AB8E4C6EEE0FEEBC2C853C64242C1B0E6E4C73C73309C4C271
      3528CB421EBBED795FE9ACFF00917D6FA47F9CFF004DCFF3BFF089217FF20924
      56BFFFD0F34EAA27AAE60F1C8B3FEADCBA8C4A1B89D3E9A1A21D6B45969F19FA
      0D5CC75331D5F2CF86459FF56E5D5BC87D7458DD5AFA9847C86CFF00BEAADCE1
      2318AEA75767FE2EE384F9EB9EA61094E1FDFF004C7FE8C98A4924B39ED1251B
      5CE34D9AD570D8F1F1FA2EFEC2E3B3B1CE365DB49FCC710BAFA985F631839710
      3EF5CBF5CB1B6F54C87B782F31F7ABBC913EA1D34794FF008CF8E032E098F9E7
      1909FF00761C3C1FF4A4EDFF00F20924BFF90492BAF3AFFFD1F34EABFF002A66
      7FC7DBFF0056E5B3D0BA95575030321E18E699A5E7893CB1DFC972C6EABFF2A6
      67FC7DBFF56E554120C83053670138989EACBCBE7C9832C72E23C3381B1FC0BD
      B595BEB30F6C1EDE07E0A2017101A092780173B8BF583A96333D36D9B99FBAED
      47DCE44B3EB37537B0B18E6D40F3E980DFFA9854CF252BD2429E8E3FF1A23C1E
      AE5CFB9E13F47FD176B3F36BE99438B9C0E5BC16B183F301D0B9DFCA5C83DC5E
      E2E7724C94F65B65AE2EB1C5CE3DCA8AB58B10C71A1F52E073BCE65E6F31CB97
      7DA311F2C23FBB17A9FF00E412497FF209252359FFD2F34EABFF002A667FC7DB
      FF0056E5555AEABFF2A667FC7DBFF56E43A69DC373B46849485282AE0F4DBA35
      808F34A5879608F294DE30B78E2D34958B286905D5F6E42AE9C0DAE06DEA7FF9
      04925FFC8249253FFFD3F35EA827AAE60FFBB16FFD5B949DA06B07007E551EA7
      FF002B65FF00E18B3FEADCA566AEF90FC8993D964F66292492631AED3B483CF8
      855EF6ECB484742CB337393E1D5931F57A3FFE412497FF0020924F5EFF00FFD4
      F34EABFF002AE67FC7DBFF0056E4F5BC58C03F39BDBC426EABFF002A667FC7DB
      FF0056E55838B4C8408B411629B441060F29210CA7F701D1E22539CB7766807C
      40099C0567B7E2987E8C6F7691F4478954DEEDCE253BEC73CCB8A8A7814BC0A0
      F53FFC82492FFE41248A5FFFD5E1BA87FCDCFB7E4FADF6DF57D57FA9B3D2DBBB
      73B7ECDDEED9B957FF00B16FFBBFFF0080ACB49253A9FF0062DFF77FFF00014B
      FEC5BFEEFF00FE02B2D2494EA7FD8B7FDDFF00FC052FFB16FF00BBFF00F80ACB
      49253D9FF92FFE1FFE49FE47F46FFDEAFF00C0525C624929FFD9FFED0C405068
      6F746F73686F7020332E30003842494D04250000000000100000000000000000
      00000000000000003842494D03ED00000000001000B400000001000100B40000
      000100013842494D042600000000000E000000000000000000003F8000003842
      494D040D000000000004000000783842494D04190000000000040000001E3842
      494D03F3000000000009000000000000000001003842494D040A000000000001
      00003842494D271000000000000A000100000000000000023842494D03F50000
      00000048002F66660001006C66660006000000000001002F6666000100A1999A
      0006000000000001003200000001005A00000006000000000001003500000001
      002D000000060000000000013842494D03F80000000000700000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFF03E800003842494D040000000000000200023842494D040200000000
      00060000000000003842494D0408000000000010000000010000024000000240
      000000003842494D041E000000000004000000003842494D041A000000000349
      00000006000000000000000000000064000000320000000A0055006E00740069
      0074006C00650064002D00310000000100000000000000000000000000000000
      0000000100000000000000000000003200000064000000000000000000000000
      0000000001000000000000000000000000000000000000001000000001000000
      0000006E756C6C0000000200000006626F756E64734F626A6300000001000000
      000000526374310000000400000000546F70206C6F6E6700000000000000004C
      6566746C6F6E67000000000000000042746F6D6C6F6E67000000640000000052
      6768746C6F6E670000003200000006736C69636573566C4C73000000014F626A
      6300000001000000000005736C6963650000001200000007736C69636549446C
      6F6E67000000000000000767726F757049446C6F6E6700000000000000066F72
      6967696E656E756D0000000C45536C6963654F726967696E0000000D6175746F
      47656E6572617465640000000054797065656E756D0000000A45536C69636554
      79706500000000496D672000000006626F756E64734F626A6300000001000000
      000000526374310000000400000000546F70206C6F6E6700000000000000004C
      6566746C6F6E67000000000000000042746F6D6C6F6E67000000640000000052
      6768746C6F6E67000000320000000375726C5445585400000001000000000000
      6E756C6C54455854000000010000000000004D73676554455854000000010000
      00000006616C74546167544558540000000100000000000E63656C6C54657874
      497348544D4C626F6F6C010000000863656C6C54657874544558540000000100
      0000000009686F727A416C69676E656E756D0000000F45536C696365486F727A
      416C69676E0000000764656661756C740000000976657274416C69676E656E75
      6D0000000F45536C69636556657274416C69676E0000000764656661756C7400
      00000B6267436F6C6F7254797065656E756D0000001145536C6963654247436F
      6C6F7254797065000000004E6F6E6500000009746F704F75747365746C6F6E67
      000000000000000A6C6566744F75747365746C6F6E67000000000000000C626F
      74746F6D4F75747365746C6F6E67000000000000000B72696768744F75747365
      746C6F6E6700000000003842494D042800000000000C000000013FF000000000
      00003842494D041100000000000101003842494D041400000000000400000006
      3842494D040C00000000065B0000000100000032000000640000009800003B60
      0000063F00180001FFD8FFE000104A46494600010201004800480000FFED000C
      41646F62655F434D0002FFEE000E41646F626500648000000001FFDB0084000C
      08080809080C09090C110B0A0B11150F0C0C0F1518131315131318110C0C0C0C
      0C0C110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C01
      0D0B0B0D0E0D100E0E10140E0E0E14140E0E0E0E14110C0C0C0C0C11110C0C0C
      0C0C0C110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
      FFC00011080064003203012200021101031101FFDD00040004FFC4013F000001
      0501010101010100000000000000030001020405060708090A0B010001050101
      0101010100000000000000010002030405060708090A0B100001040103020402
      0507060805030C33010002110304211231054151611322718132061491A1B142
      23241552C16233347282D14307259253F0E1F163733516A2B283264493546445
      C2A3743617D255E265F2B384C3D375E3F3462794A485B495C4D4E4F4A5B5C5D5
      E5F55666768696A6B6C6D6E6F637475767778797A7B7C7D7E7F7110002020102
      04040304050607070605350100021103213112044151617122130532819114A1
      B14223C152D1F0332462E1728292435315637334F1250616A2B283072635C2D2
      449354A317644555367465E2F2B384C3D375E3F34694A485B495C4D4E4F4A5B5
      C5D5E5F55666768696A6B6C6D6E6F62737475767778797A7B7C7FFDA000C0301
      0002110311003F00F3DEA7D4FA933A965B19977358DBAC0D68B1C0001CE86B46
      E55BF6AF54FF00B997FF00DBAFFF00C925D57FE54CCFF8FB7FEADCA7D33A5DFD
      42DD8CF6B1BABDE7400789409005948049000B2740030FDABD53FEE65FFF006E
      BFFF002497ED5EA9FF00732FFF00B75FFF00925D253D2FA4E33768A8E43FBBDE
      61BF267D2527E174BB46DB314327F3AB2411FD97EE501E6F15D59F374E3F01F8
      84A1C7ED01D784CA227FE2BCCFED5EA9FF00732FFF00B75FFF00924BF6AF54FF
      00B997FF00DBAFFF00C92BBD5BA13B119F68C777AB8E4C6EEE0FEEBC2C853C64
      242C1B0E6E4C73C73309C4C2713528CB421EBBED795FE9ACFF00917D6FA47F9C
      FF004DCFF3BFF089217FF2092456BFFFD0F34EAA27AAE60F1C8B3FEADCBA8C4A
      1B89D3E9A1A21D6B45969F19FA0D5CC75331D5F2CF86459FF56E5D5BC87D7458
      DD5AFA9847C86CFF00BEAADCE12318AEA75767FE2EE384F9EB9EA61094E1FDFF
      004C7FE8C98A4924B39ED1251B5CE34D9AD570D8F1F1FA2EFEC2E3B3B1CE365D
      B49FCC710BAFA985F6318397103EF5CBF5CB1B6F54C87B782F31F7ABBC913EA1
      D34794FF008CF8E032E098F9E71909FF00761C3C1FF4A4EDFF00F20924BFF904
      92BAF3AFFFD1F34EABFF002A667FC7DBFF0056E5B3D0BA95575030321E18E699
      A5E7893CB1DFC972C6EABFF2A667FC7DBFF56E554120C83053670138989EACBC
      BE7C9832C72E23C3381B1FC0BDB595BEB30F6C1EDE07E0A2017101A092780173
      B8BF583A96333D36D9B99FBAED47DCE44B3EB37537B0B18E6D40F3E980DFFA98
      54CF252BD2429E8E3FF1A23C1EAE5CFB9E13F47FD176B3F36BE99438B9C0E5BC
      16B183F301D0B9DFCA5C83DC5EE2E7724C94F65B65AE2EB1C5CE3DCA8AB58B10
      C71A1F52E073BCE65E6F31CB977DA311F2C23FBB17A9FF00E412497FF2092523
      59FFD2F34EABFF002A667FC7DBFF0056E5555AEABFF2A667FC7DBFF56E43A69D
      C373B46849485282AE0F4DBA35808F34A5879608F294DE30B78E2D34958B2869
      05D5F6E42AE9C0DAE06DEA7FF904925FFC8249253FFFD3F35EA827AAE60FFBB1
      6FFD5B949DA06B07007E551EA7FF002B65FF00E18B3FEADCA566AEF90FC8993D
      964F66292492631AED3B483CF8855EF6ECB484742CB337393E1D5931F57A3FFE
      412497FF0020924F5EFF00FFD4F34EABFF002AE67FC7DBFF0056E4F5BC58C03F
      39BDBC426EABFF002A667FC7DBFF0056E55838B4C8408B411629B441060F2921
      0CA7F701D1E22539CB7766807C40099C0567B7E2987E8C6F7691F4478954DEED
      CE253BEC73CCB8A8A7814BC0A0F53FFC82492FFE41248A5FFFD5E1BA87FCDCFB
      7E4FADF6DF57D57FA9B3D2DBBB73B7ECDDEED9B957FF00B16FFBBFFF0080ACB4
      9253A9FF0062DFF77FFF00014BFEC5BFEEFF00FE02B2D2494EA7FD8B7FDDFF00
      FC052FFB16FF00BBFF00F80ACB49253D9FF92FFE1FFE49FE47F46FFDEAFF00C0
      525C624929FFD9003842494D042100000000005300000001010000000F004100
      64006F00620065002000500068006F0074006F00730068006F00700000001200
      410064006F00620065002000500068006F0074006F00730068006F0070002000
      43005300000001003842494D04060000000000070004010100030100FFE11804
      687474703A2F2F6E732E61646F62652E636F6D2F7861702F312E302F003C3F78
      7061636B657420626567696E3D27EFBBBF272069643D2757354D304D70436568
      69487A7265537A4E54637A6B633964273F3E0A3C783A786D706D65746120786D
      6C6E733A783D2761646F62653A6E733A6D6574612F2720783A786D70746B3D27
      584D5020746F6F6C6B697420332E302D32382C206672616D65776F726B20312E
      36273E0A3C7264663A52444620786D6C6E733A7264663D27687474703A2F2F77
      77772E77332E6F72672F313939392F30322F32322D7264662D73796E7461782D
      6E73232720786D6C6E733A69583D27687474703A2F2F6E732E61646F62652E63
      6F6D2F69582F312E302F273E0A0A203C7264663A4465736372697074696F6E20
      7264663A61626F75743D27757569643A37373330326164662D336236332D3131
      64632D623564322D666335343963383638633465270A2020786D6C6E733A6578
      69663D27687474703A2F2F6E732E61646F62652E636F6D2F657869662F312E30
      2F273E0A20203C657869663A436F6C6F7253706163653E343239343936373239
      353C2F657869663A436F6C6F7253706163653E0A20203C657869663A50697865
      6C5844696D656E73696F6E3E35303C2F657869663A506978656C5844696D656E
      73696F6E3E0A20203C657869663A506978656C5944696D656E73696F6E3E3130
      303C2F657869663A506978656C5944696D656E73696F6E3E0A203C2F7264663A
      4465736372697074696F6E3E0A0A203C7264663A4465736372697074696F6E20
      7264663A61626F75743D27757569643A37373330326164662D336236332D3131
      64632D623564322D666335343963383638633465270A2020786D6C6E733A7064
      663D27687474703A2F2F6E732E61646F62652E636F6D2F7064662F312E332F27
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A446573
      6372697074696F6E207264663A61626F75743D27757569643A37373330326164
      662D336236332D313164632D623564322D666335343963383638633465270A20
      20786D6C6E733A70686F746F73686F703D27687474703A2F2F6E732E61646F62
      652E636F6D2F70686F746F73686F702F312E302F273E0A20203C70686F746F73
      686F703A486973746F72793E3C2F70686F746F73686F703A486973746F72793E
      0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A44657363
      72697074696F6E207264663A61626F75743D27757569643A3737333032616466
      2D336236332D313164632D623564322D666335343963383638633465270A2020
      786D6C6E733A746966663D27687474703A2F2F6E732E61646F62652E636F6D2F
      746966662F312E302F273E0A20203C746966663A4F7269656E746174696F6E3E
      313C2F746966663A4F7269656E746174696F6E3E0A20203C746966663A585265
      736F6C7574696F6E3E3138302F313C2F746966663A585265736F6C7574696F6E
      3E0A20203C746966663A595265736F6C7574696F6E3E3138302F313C2F746966
      663A595265736F6C7574696F6E3E0A20203C746966663A5265736F6C7574696F
      6E556E69743E323C2F746966663A5265736F6C7574696F6E556E69743E0A203C
      2F7264663A4465736372697074696F6E3E0A0A203C7264663A44657363726970
      74696F6E207264663A61626F75743D27757569643A37373330326164662D3362
      36332D313164632D623564322D666335343963383638633465270A2020786D6C
      6E733A7861703D27687474703A2F2F6E732E61646F62652E636F6D2F7861702F
      312E302F273E0A20203C7861703A437265617465446174653E323030372D3037
      2D32365432323A33323A31302B31323A30303C2F7861703A4372656174654461
      74653E0A20203C7861703A4D6F64696679446174653E323030372D30372D3236
      5432323A33323A31302B31323A30303C2F7861703A4D6F64696679446174653E
      0A20203C7861703A4D65746164617461446174653E323030372D30372D323654
      32323A33323A31302B31323A30303C2F7861703A4D6574616461746144617465
      3E0A20203C7861703A43726561746F72546F6F6C3E41646F62652050686F746F
      73686F702043532057696E646F77733C2F7861703A43726561746F72546F6F6C
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A446573
      6372697074696F6E207264663A61626F75743D27757569643A37373330326164
      662D336236332D313164632D623564322D666335343963383638633465270A20
      20786D6C6E733A7861704D4D3D27687474703A2F2F6E732E61646F62652E636F
      6D2F7861702F312E302F6D6D2F273E0A20203C7861704D4D3A446F63756D656E
      7449443E61646F62653A646F6369643A70686F746F73686F703A373733303261
      64652D336236332D313164632D623564322D6663353439633836386334653C2F
      7861704D4D3A446F63756D656E7449443E0A203C2F7264663A44657363726970
      74696F6E3E0A0A203C7264663A4465736372697074696F6E207264663A61626F
      75743D27757569643A37373330326164662D336236332D313164632D62356432
      2D666335343963383638633465270A2020786D6C6E733A64633D27687474703A
      2F2F7075726C2E6F72672F64632F656C656D656E74732F312E312F273E0A2020
      3C64633A666F726D61743E696D6167652F6A7065673C2F64633A666F726D6174
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A3C2F7264663A524446
      3E0A3C2F783A786D706D6574613E0A2020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020200A202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020200A20202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020202020200A2020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20200A2020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020200A202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020200A20202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020200A2020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020200A202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020200A20202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      0A20202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020200A2020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020200A202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020200A20202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020200A2020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020200A202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020200A20
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020200A20202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020200A2020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020200A202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020200A20202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020200A2020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020202020200A202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      200A202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020200A20202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020200A2020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020200A202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020200A20202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020200A2020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020202020202020200A
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020200A202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020200A20202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020200A2020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020200A202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020200A20202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020202020200A2020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20200A2020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020200A202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020200A20202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020200A2020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020200A202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020200A3C3F787061636B657420656E643D277727
      3F3EFFEE002641646F6265006400000000010300150403060A0D000000000000
      00000000000000000000FFDB0084000604040405040605050609060506090B08
      0606080B0C0A0A0B0A0A0C100C0C0C0C0C0C100C0C0C0C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010707070D0C0D18101018140E0E0E1414
      0E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC20011080064003203011100021101
      031101FFC400D000000105010100000000000000000000000002030405060107
      0101000203010100000000000000000000000102030405060710000103030205
      0207010000000000000001000204101103203430121314252131405022322324
      0515110000030504080603000000000000000000010211B11272031031518420
      21613292A23343417122421334A1D25312000102030900000000000000000000
      002100011020305060618191A1B1C11213010001020503050101010000000000
      0001110021102031415130F061718191B1C1A1D1E1FFDA000C03010302110311
      000001F3D2300001A43362EB7D0E9FA05572D2EDF02A32EB6A8A0351CFF51DD7
      EF83B7D2C7753C2E8A5426AF99ECD18BA80B532FD6F9DDDD9405CEB74ECF43D8
      A566F6BCDE437BCEEA0A0229634BB916ACBE244B5450110E81C0354500D443F4
      A0376B47B5B52500AC58B9150EA63E5CDA59508AC58931500672E7D24A80ED28
      53182AD7879326A0A0228F44760D4CA25AA2111C0000BF3FFFDA000801010001
      050293264091DD4A5DD4A5DD4A5DD4A5DD4A5D5CAA56EA3457E77322C5C68E18
      AE52A09C6292B758983147A32C567674F2A93BB3EADA345DD39C1D294ADD4192
      D730B48A67CCD8EC26E54ADD2C7FD0938C3BFA7248739CE3495BAD52B74D65D7
      D2BD13982B2B746A13C59CA4EECFBD72FDEA56E9A79853D91372A56E9754AEA9
      45C4D647F9DD7F16BC5AF16BC5AF16BF557FFFDA0008010200010502E0128E45
      D44D75F464350743FDEA2AF6D58DD365CBC5BFCA3FFFDA0008010300010502E0
      0174C809D002C988B0D60E3F4A67C7CCDAC33F8E8E36158D9F90B5C0D2549BE9
      0E211793C5BABE93ACEB351F03FFDA0008010202063F02BB7FFFDA0008010302
      063F02A27641F5464F51E29E0E843CB66FD4C4DABFFFDA0008010101063F02AA
      45556444B530A23C47597C463ACBE231D65F118EB2F88C7597C4637CFE9C57FB
      B1F3DA2B4EA78615DE2637633C4C7AA9B36A446838A9D992156753C21057ABD4
      AB613DD56A30A4E03242ACEA7842BC0D25691622A19623242B4EA78F8566C32D
      C31AEC3FEA771601A3242B4EA7D8C2534B030C2387CB5069EBB3242B4EA7E964
      8569D4F0D3B85C2E0D2B3242ACEA78668E48559D4FD2C90AD3A9E3695AD3B324
      2B4EA7E9648548BE68A238990B1AD1DFE51DFE51DFE51DFE51DFE51EFF00ABB3
      A7FB7E07FFDA0008010103013F213EC000002B17AEE5FDAEE5FDAEE5FDAEE5FD
      AEE5FDAFF4576BDD5DCB9D6954DDF40A0A0E55A3E35FAA3607C88FE33F757963
      7DCF0E3BBBEBEAD8012FD1FB8C86FD9FD747DABCAA8C3DCB9D200D93D88FCC5C
      8DC15A012B0F72E745F5D174F47C34DC18A05602576A765938F3B77CF8A645AB
      87B973A1464AF98C43FB49001D627D2A50C9E71F72E79FDCB9D44D0A59A7CAA7
      71A51C3A98FB773AB0381F78A866A60C3DDB9D7D47D64D4C3DCB9D40989F1B42
      AF187B973A14D28DDBFAD7101ED4C5F1FEBDC8989BC4E939C924ABFFDA000801
      0203013F21E8414BB50A8722563189A31191A319E930DD72A5A01D45C134391C
      EE4314C432C5474FFFDA0008010303013F21E83A82EBA156AF8F1FE9FF002A0D
      C1F43F51514F63B3E9904E46C780D7E5C4DCDCBFA8FF0074C930F0A3F33FB8C8
      2EC4FC64D5BCDE3CD0B2A4F14B144357B21FB974853D18FAAD78FA95FBEBE339
      C64D59C6233474FF00FFDA000C0301030211031100001000000006C821B48025
      AF811580092A8040240289409D2480092C01E800256A0124927FFFDA00080101
      03013F100B244A08020019B264C9932772BEE61725876D405AAB415A65CAEF83
      A3D5A5CB5DC23FAA97DED1121787671983C8500C418355666F018A25C391A6CF
      737A74ED3FC1C281DD06A19D94F86B4F9C560E4478975AD962BE71E412687472
      EB513F2DB93A2722593D28F3AC004ABE8504344A8A443070D28BCCAAAFAE3C80
      121344A2111DBFE52AB4DB2ECF814C9774AA72F24350F197927120DF9F051A26
      9CCD5F84A56D077891FB699CBC9D4FF9490C61127CD208B2027D5138C3C24353
      91B34676CE358C64760C8C61E5C2A1A90652D407278F4A4451212C8E021D0D4D
      AAECD222DF1E476543460891B081B7BD3B8868806A4CE7A54AA0C8B6DB43FFDA
      0008010203013F10E8199698D947D680B644E118B934A4C605884B142CC60C9A
      D20C383AE535E2B46283A7052AA752E477C468C757494D4644D4683A5FFFDA00
      08010303013F10E81F3A44929D5C576A1D958D790CC517F1D06416B2502035C6
      9C741350E3325F4581C6A0095829EAC1CB25659F3543C751B4A052B6A950E43B
      C62A19E9D3DCC6ECE541A871D3FFD9}
  end
  object Label11: TLabel
    Left = 616
    Top = 320
    Width = 6
    Height = 13
    Caption = '0'
  end
  object Label12: TLabel
    Left = 432
    Top = 368
    Width = 47
    Height = 13
    Caption = 'Failed List'
  end
  object Sort: TButton
    Left = 200
    Top = 24
    Width = 75
    Height = 20
    Caption = 'Sort'
    TabOrder = 0
    OnClick = Start
  end
  object ListBox1: TListBox
    Left = 16
    Top = 414
    Width = 121
    Height = 142
    AutoComplete = False
    ExtendedSelect = False
    ItemHeight = 13
    TabOrder = 1
    OnClick = ListBox1Click
  end
  object ListBox2: TListBox
    Left = 264
    Top = 414
    Width = 121
    Height = 142
    AutoComplete = False
    ExtendedSelect = False
    ItemHeight = 13
    TabOrder = 2
    OnClick = ListBox2Click
  end
  object Stop: TButton
    Left = 308
    Top = 24
    Width = 75
    Height = 20
    Caption = 'Stop'
    TabOrder = 3
    OnClick = StopClick
  end
  object Edit1: TEdit
    Left = 16
    Top = 24
    Width = 153
    Height = 21
    TabOrder = 4
  end
  object Panel1: TPanel
    Left = 16
    Top = 288
    Width = 377
    Height = 89
    BorderStyle = bsSingle
    Color = clGray
    TabOrder = 5
    object Label4: TLabel
      Left = 8
      Top = 12
      Width = 61
      Height = 13
      Caption = 'Total Friends'
    end
    object Label5: TLabel
      Left = 8
      Top = 36
      Width = 34
      Height = 13
      Caption = 'Friends'
    end
    object Label6: TLabel
      Left = 8
      Top = 60
      Width = 63
      Height = 13
      Caption = 'Other Friends'
    end
    object Label7: TLabel
      Left = 192
      Top = 12
      Width = 6
      Height = 13
      Caption = '0'
    end
    object Label8: TLabel
      Left = 192
      Top = 36
      Width = 6
      Height = 13
      Caption = '0'
    end
    object Label9: TLabel
      Left = 192
      Top = 60
      Width = 6
      Height = 13
      Caption = '0'
    end
  end
  object ComboBox1: TComboBox
    Left = 136
    Top = 382
    Width = 121
    Height = 21
    ItemHeight = 13
    TabOrder = 6
    Text = 'ComboBox1'
    Items.Strings = (
      'http://www.google.com'
      'http://www.experts-exchange.com'
      'http://www.xtra.co.nz'
      'http://www.delphi.com')
  end
  object ComboBox2: TComboBox
    Left = 488
    Top = 344
    Width = 113
    Height = 21
    ItemHeight = 13
    TabOrder = 7
    Text = 'ComboBox2'
  end
  object Button1: TButton
    Left = 160
    Top = 532
    Width = 81
    Height = 33
    Caption = 'Finished'
    TabOrder = 8
    OnClick = Button1Click
  end
  object WebBrowser1: TWebBrowser
    Left = 16
    Top = 56
    Width = 377
    Height = 217
    TabOrder = 9
    ControlData = {
      4C000000F72600006D1600000000000000000000000000000000000000000000
      000000004C000000000000000000000001000000E0D057007335CF11AE690800
      2B2E126208000000000000004C0000000114020000000000C000000000000046
      8000000000000000000000000000000000000000000000000000000000000000
      00000000000000000100000000000000000000000000000000000000}
  end
  object Memo1: TMemo
    Left = 408
    Top = 56
    Width = 281
    Height = 225
    Lines.Strings = (
      'Memo1')
    ScrollBars = ssBoth
    TabOrder = 10
    WordWrap = False
  end
  object ProgressBar1: TProgressBar
    Left = 408
    Top = 296
    Width = 281
    Height = 17
    Step = 1
    TabOrder = 11
  end
  object FailedList: TMemo
    Left = 432
    Top = 384
    Width = 217
    Height = 169
    Lines.Strings = (
      'Memo1')
    ScrollBars = ssBoth
    TabOrder = 12
    WordWrap = False
  end
end


Unit1.pas
=========

unit unit1;

interface

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, SHDocVw_TLB, Menus, ExtCtrls, shellapi,WinInet,
  ComCtrls, jpeg, SHDocVw;

type

  TMyThread    =  class(TThread)
  private
     internetFile,localFileName:String;
     FMyForm:TForm;
     FSearchString:String;
     FFound:Boolean;
     progress:Integer;
     Persentage:Extended;
  protected
     procedure Execute; override;
     procedure FileNotFound;
     procedure UpdateForm;
  public
     constructor Create(Form: TForm;SearchString:String);
  published
     property OnTerminate;
  end;


  TFormSort = class(TForm)
    Sort: TButton;
    ListBox1: TListBox;
    Label1: TLabel;
    ListBox2: TListBox;
    Label2: TLabel;
    Label3: TLabel;
    Stop: TButton;
    Edit1: TEdit;
    Label10: TLabel;
    Panel1: TPanel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Bevel1: TBevel;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Image1: TImage;
    Button1: TButton;
    WebBrowser1: TWebBrowser;
    Memo1: TMemo;
    ProgressBar1: TProgressBar;
    Label11: TLabel;
    FailedList: TMemo;
    Label12: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
    procedure ListBox2Click(Sender: TObject);
    procedure Com2save(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Start(Sender: TObject);
    procedure StopClick(Sender: TObject);

  private
    { Private declarations }
    Complete:Boolean;
  public
    { Public declarations }
  end;

var
  FormSort: TFormSort;

implementation

{$R *.dfm}

function GetInetFile (const fileURL, FileName: String): boolean;
const
  BufferSize = 1024;
var
  hSession, hURL: HInternet;
  Buffer: array[1..BufferSize] of Byte;
  BufferLen: DWORD;
  f: File;
  sAppName: string;
begin
 result := false;
 sAppName := ExtractFileName(Application.ExeName) ;
 hSession := InternetOpen(PChar(sAppName), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0) ;
 try
  hURL := InternetOpenURL(hSession, PChar(fileURL), nil, 0, 0, 0) ;
  try
   AssignFile(f, FileName) ;
   Rewrite(f,1) ;
   repeat
    InternetReadFile(hURL, @Buffer, SizeOf(Buffer), BufferLen) ;
    BlockWrite(f, Buffer, BufferLen)
   until BufferLen = 0;
   CloseFile(f) ;
   result := True;
  finally
   InternetCloseHandle(hURL)
  end
 finally
  InternetCloseHandle(hSession)
 end
end;

function SearchFile (const FileName,SearchString: String): boolean;
  var MyStrLst:TStringList;
begin
  result := false;
  try
     MyStrLst:=TStringList.Create;
     MyStrLst.LoadFromFile(FileName);
     Result:= Pos(SearchString,AnsiUpperCase(MyStrLst.Text))>0;
  finally
     MyStrLst.Free;
  end;
end;

{========================================================================}

procedure TMyThread.Execute;
var i:Integer;
    NormalExit:Boolean;
begin
  NormalExit:= True;
  for i:=0 to TFormSort(FMyForm).ComboBox1.Items.Count-1 do
  begin
    internetFile:='http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+
                                                     TFormSort(FMyForm).ComboBox1.Items.Strings[i];
    if GetInetFile(internetFile,localFileName) then
    begin
      FFound:=SearchFile(localFileName,FSearchString);
    end
    else Synchronize(FileNotFound);
    progress:=i+1;
    Persentage := ((i+1)/ TFormSort(FMyForm).combobox1.Items.count) * 100;
    Synchronize(UpdateForm);
    if TFormSort(FMyForm).label3.caption = '0' then
    begin
      NormalExit:=False;
      Break;
    end;
  end;
  TFormSort(FMyForm).Complete:=NormalExit;
end;

constructor TMyThread.Create(Form: TForm;SearchString:String);
begin
  FreeOnTerminate:=True;
  FMyForm :=Form;
  FSearchString:=SearchString;
  OnTerminate:=TFormSort(FMyForm).Com2save;
  localFileName:=ExtractFilePath(ParamStr(0))+ 'data.txt';
  Inherited Create(False);
end;

procedure TMyThread.FileNotFound;
begin
  TFormSort(FMyForm).FailedList.Lines.Add(internetFile);
end;

procedure TMyThread.UpdateForm;
begin
   TFormSort(FMyForm).progressbar1.position := progress;
   TFormSort(FMyForm).label11.Caption := inttostr(round(Persentage)) + ' ' + '%' + ' ' + 'complete';
   if FFound then
     TFormSort(FMyForm).Label8.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label8.Caption)+1)
   else TFormSort(FMyForm).Label9.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label9.Caption)+1);
end;


{========================================================================}

procedure TFormSort.Com2save(Sender: TObject);
var fname,path,report1,report2 : string;
begin
  if Complete then
  begin
   fname := 'report.html';
   path := ExtractFilePath(ParamStr(0));
   if FileExists(path+ 'media\' + 'red.jpg') then
      image1.Picture.LoadFromFile(path+ 'media\' + 'red.jpg');
   label3.caption := '0';
   report1 := '<font color=blue>' + label5.caption + ' = ' + '<font color=red>' + label8.caption +'</font><br><br>';
   combobox2.Items.Add (report1);
   report2 := '<font color=blue>Other Friends = ' + '<font color=red>' + label9.caption + '</font><br><br>' + #10#13 + '</HTML>';
   combobox2.Items.Add (report2);
   combobox2.Items.SaveToFile(path + 'html\' + fname);
   listbox1.Items.SaveToFile(path + 'lists\' + edit1.Text + '.rba');
   webbrowser1.Navigate (path + 'html\' + fname);
  end
  else ShowMessage('Canceled');
  Edit1.Enabled:=True;
end;


procedure TFormSort.FormCreate(Sender: TObject);
var fname,path : string;
begin
  fname := 'all.rba';
  path := ExtractFilePath(ParamStr(0));
  if fileexists (path + 'lists\' + fname) then
  combobox1.Items.LoadFromFile(path + 'lists\' + fname);
  combobox1.ItemIndex := 0;
  label7.caption := inttostr(combobox1.Items.count);
  if fileexists (path + 'html\' + 'report.html') then
    combobox2.Items.LoadFromFile(path + 'html\' + 'report.html');
  progressbar1.Max := combobox1.Items.count -1;
end;

procedure TFormSort.Start(Sender: TObject);
var t,path : string;
begin
  if edit1.text= '' then exit;
  t:= AnsiUpperCase(edit1.Text);
  label5.caption := t + ' ' + 'Friends';
  label2.Caption := t;
  label3.caption := '1';

  path := ExtractFilePath(ParamStr(0))+'media\';
  ProgressBar1.Position:=0;
  ProgressBar1.Max:=ComboBox1.Items.Count;
  if fileexists (path+'green.jpg') then
     image1.Picture.LoadFromFile(path+'green.jpg');
  edit1.enabled := false;
  TMyThread.Create(Self,t);
end;

procedure TFormSort.StopClick(Sender: TObject);
var path : string;
begin
   edit1.Enabled := true;
   path := ExtractFilePath(ParamStr(0))+'media\';
   label3.caption := '0';
   if fileexists (path+'red.jpg') then
      image1.Picture.LoadFromFile(path+'red.jpg');
end;


procedure TFormSort.ListBox1Click(Sender: TObject);
var s,path: string;
begin
   edit1.Enabled := true;
   path := ExtractFilePath(ParamStr(0))+'media\';
   label3.caption := '0';
   if fileexists (path+'red.jpg') then
   image1.Picture.LoadFromFile(path+'red.jpg');
   s:= (listbox1.Items[listbox1.itemindex]);
   webbrowser1.Navigate('http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s);
end;

procedure TFormSort.ListBox2Click(Sender: TObject);
var s,path: string;
begin
   edit1.Enabled := true;
   path := ExtractFilePath(ParamStr(0))+'media\';
   label3.caption := '0';
   if fileexists (path + 'red.jpg') then
   image1.Picture.LoadFromFile(path+'red.jpg');
   s:= (listbox2.Items[listbox2.itemindex]);
   webbrowser1.Navigate('http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s);
end;



procedure TFormSort.Button1Click(Sender: TObject);
begin
  FormSort.Close;
end;


end.
0
 
LVL 20

Author Comment

by:Mark Brady
ID: 19641645
I think that might work.  I have added two lines so after each search, the result is added to the listboxes.
Is this the best way to see visually each item after it has completed the search ?  I used a string.
procedure TMyThread.UpdateForm;
var
s: string;
begin
   s:= TFormSort(FMyForm).ComboBox1.Items.Strings[TFormSort(FMyForm).ComboBox1.Itemindex];
   TFormSort(FMyForm).progressbar1.position := progress;
   TFormSort(FMyForm).label11.Caption := inttostr(round(Persentage)) + ' ' + '%' + ' ' + 'complete';
   if FFound then
   begin
     TFormSort(FMyForm).Label8.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label8.Caption)+1);
                                 TFormSort(FMyForm).Listbox1.items.add (s);
                                 end
   else
   begin
   TFormSort(FMyForm).Label9.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label9.Caption)+1);
                                 TFormSort(FMyForm).Listbox2.items.add (s);
                                 end;
end;


Finally, with the search I need it to be NON Case sensitve.  eg:  if search string 'auckland' used, it should find 'auckland', 'AUCKLAND',  'AuCKlAnD' etc.......
How can we make this happen ?

Thank you
Elvin
0
 
LVL 20

Author Comment

by:Mark Brady
ID: 19641720
Dinilud

Aslo how do I modify the search code to add multiple searches in each file ?

eg:  The search already searches for the string in edit1
I need to also search for  pos('<name='> + 6);
I need to also search for pos('<Genre='> + 7);
I need to also search for pos('<Age='> + 5);
and maybe some more searches.  Then I will add each result to a combobox so the result for one search will be something like this:

10621<Mary><Rock/Alt><37>
Then I can save that to file and extract the information from it in another procedure.

Thanks
Elvin
0
 
LVL 10

Expert Comment

by:dinilud
ID: 19643604
Use like this

procedure TMyThread.UpdateForm;
var
s: string;
begin
   s:= TFormSort(FMyForm).ComboBox1.Items.Strings[progress-1];
   TFormSort(FMyForm).progressbar1.position := progress;
   TFormSort(FMyForm).label11.Caption := inttostr(round(Persentage)) + ' ' + '%' + ' ' + 'complete';
   if FFound then
   begin
     TFormSort(FMyForm).Label8.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label8.Caption)+1);
     TFormSort(FMyForm).Listbox1.items.add (s);
   end
   else
   begin
     TFormSort(FMyForm).Label9.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label9.Caption)+1);
     TFormSort(FMyForm).Listbox2.items.add (s);
   end;
end;


i think this search is a Non Case sensitive. Because we are using Upper case.
0
 
LVL 10

Expert Comment

by:dinilud
ID: 19643652
procedure TMyThread.Execute;
var i:Integer;
    NormalExit:Boolean;
begin
  NormalExit:= True;
  for i:=0 to TFormSort(FMyForm).ComboBox1.Items.Count-1 do
  begin
    internetFile:='http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+
                                                     TFormSort(FMyForm).ComboBox1.Items.Strings[i];
    if GetInetFile(internetFile,localFileName) then
    begin
           // FFound:=SearchFile(localFileName,FSearchString);
          Here you have to modify
          Open the local file
           Loop
          {
              Search for a String
              if found Add to a result or add to a result combo( synchronize this method
           }
          Close the Local file
    end
    else Synchronize(FileNotFound);
    progress:=i+1;
    Persentage := ((i+1)/ TFormSort(FMyForm).combobox1.Items.count) * 100;
    Synchronize(UpdateForm);
    if TFormSort(FMyForm).label3.caption = '0' then
    begin
      NormalExit:=False;
      Break;
    end;
  end;
0
 
LVL 20

Author Comment

by:Mark Brady
ID: 19644096
Thanks for your help.  Can you assist me in showing me how to do the multiple search ? For eg:
In your code, open the local file, search for 'delphi' and if found place in a string or stringlist.  Then search for 'experts' and if found add that to the string, then at the end of the search, add that string to combobox3.

I have accepted yourr answer but would really appreciate your final help with this.

Elvin
0
 
LVL 10

Expert Comment

by:dinilud
ID: 19644312
You Have To refine all the code.

Unit1.dfm
========

object FormSort: TFormSort
  Left = 35
  Top = 21
  Width = 707
  Height = 612
  Caption = 'Sort Friends'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
    Left = 264
    Top = 398
    Width = 26
    Height = 13
    Caption = 'Other'
  end
  object Label2: TLabel
    Left = 16
    Top = 398
    Width = 44
    Height = 13
    Caption = 'Selection'
  end
  object Label3: TLabel
    Left = 197
    Top = 516
    Width = 6
    Height = 13
    Caption = '0'
  end
  object Label10: TLabel
    Left = 16
    Top = 8
    Width = 112
    Height = 13
    Caption = 'Enter the search criteria'
  end
  object Bevel1: TBevel
    Left = 192
    Top = 19
    Width = 201
    Height = 30
    Shape = bsFrame
  end
  object Image1: TImage
    Left = 176
    Top = 414
    Width = 50
    Height = 100
    Picture.Data = {
      0A544A504547496D61676520330000FFD8FFE000104A4649460001020100B400
      B40000FFE107754578696600004D4D002A000000080007011200030000000100
      010000011A00050000000100000062011B0005000000010000006A0128000300
      00000100020000013100020000001B0000007201320002000000140000008D87
      69000400000001000000A4000000D0000000B400000001000000B40000000141
      646F62652050686F746F73686F702043532057696E646F777300323030373A30
      373A32362032323A33323A3130000000000003A001000300000001FFFF0000A0
      0200040000000100000032A00300040000000100000064000000000000000601
      0300030000000100060000011A0005000000010000011E011B00050000000100
      00012601280003000000010002000002010004000000010000012E0202000400
      0000010000063F0000000000000048000000010000004800000001FFD8FFE000
      104A46494600010201004800480000FFED000C41646F62655F434D0002FFEE00
      0E41646F626500648000000001FFDB0084000C08080809080C09090C110B0A0B
      11150F0C0C0F1518131315131318110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010D0B0B0D0E0D100E0E10140E0E
      0E14140E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC00011080064003203012200
      021101031101FFDD00040004FFC4013F00000105010101010101000000000000
      00030001020405060708090A0B01000105010101010101000000000000000100
      02030405060708090A0B1000010401030204020507060805030C330100021103
      04211231054151611322718132061491A1B14223241552C16233347282D14307
      259253F0E1F163733516A2B283264493546445C2A3743617D255E265F2B384C3
      D375E3F3462794A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6E6F6
      37475767778797A7B7C7D7E7F711000202010204040304050607070605350100
      021103213112044151617122130532819114A1B14223C152D1F0332462E17282
      92435315637334F1250616A2B283072635C2D2449354A317644555367465E2F2
      B384C3D375E3F34694A485B495C4D4E4F4A5B5C5D5E5F55666768696A6B6C6D6
      E6F62737475767778797A7B7C7FFDA000C03010002110311003F00F3DEA7D4FA
      933A965B19977358DBAC0D68B1C0001CE86B46E55BF6AF54FF00B997FF00DBAF
      FF00C925D57FE54CCFF8FB7FEADCA7D33A5DFD42DD8CF6B1BABDE74007894090
      05948049000B2740030FDABD53FEE65FFF006EBFFF002497ED5EA9FF00732FFF
      00B75FFF00925D253D2FA4E33768A8E43FBBDE61BF267D2527E174BB46DB3143
      27F3AB2411FD97EE501E6F15D59F374E3F01F884A1C7ED01D784CA227FE2BCCF
      ED5EA9FF00732FFF00B75FFF00924BF6AF54FF00B997FF00DBAFFF00C92BBD5B
      A13B119F68C777AB8E4C6EEE0FEEBC2C853C64242C1B0E6E4C73C73309C4C271
      3528CB421EBBED795FE9ACFF00917D6FA47F9CFF004DCFF3BFF089217FF20924
      56BFFFD0F34EAA27AAE60F1C8B3FEADCBA8C4A1B89D3E9A1A21D6B45969F19FA
      0D5CC75331D5F2CF86459FF56E5D5BC87D7458DD5AFA9847C86CFF00BEAADCE1
      2318AEA75767FE2EE384F9EB9EA61094E1FDFF004C7FE8C98A4924B39ED1251B
      5CE34D9AD570D8F1F1FA2EFEC2E3B3B1CE365DB49FCC710BAFA985F631839710
      3EF5CBF5CB1B6F54C87B782F31F7ABBC913EA1D34794FF008CF8E032E098F9E7
      1909FF00761C3C1FF4A4EDFF00F20924BFF90492BAF3AFFFD1F34EABFF002A66
      7FC7DBFF0056E5B3D0BA95575030321E18E699A5E7893CB1DFC972C6EABFF2A6
      67FC7DBFF56E554120C83053670138989EACBCBE7C9832C72E23C3381B1FC0BD
      B595BEB30F6C1EDE07E0A2017101A092780173B8BF583A96333D36D9B99FBAED
      47DCE44B3EB37537B0B18E6D40F3E980DFFA9854CF252BD2429E8E3FF1A23C1E
      AE5CFB9E13F47FD176B3F36BE99438B9C0E5BC16B183F301D0B9DFCA5C83DC5E
      E2E7724C94F65B65AE2EB1C5CE3DCA8AB58B10C71A1F52E073BCE65E6F31CB97
      7DA311F2C23FBB17A9FF00E412497FF209252359FFD2F34EABFF002A667FC7DB
      FF0056E5555AEABFF2A667FC7DBFF56E43A69DC373B46849485282AE0F4DBA35
      808F34A5879608F294DE30B78E2D34958B286905D5F6E42AE9C0DAE06DEA7FF9
      04925FFC8249253FFFD3F35EA827AAE60FFBB16FFD5B949DA06B07007E551EA7
      FF002B65FF00E18B3FEADCA566AEF90FC8993D964F66292492631AED3B483CF8
      855EF6ECB484742CB337393E1D5931F57A3FFE412497FF0020924F5EFF00FFD4
      F34EABFF002AE67FC7DBFF0056E4F5BC58C03F39BDBC426EABFF002A667FC7DB
      FF0056E55838B4C8408B411629B441060F29210CA7F701D1E22539CB7766807C
      40099C0567B7E2987E8C6F7691F4478954DEEDCE253BEC73CCB8A8A7814BC0A0
      F53FFC82492FFE41248A5FFFD5E1BA87FCDCFB7E4FADF6DF57D57FA9B3D2DBBB
      73B7ECDDEED9B957FF00B16FFBBFFF0080ACB49253A9FF0062DFF77FFF00014B
      FEC5BFEEFF00FE02B2D2494EA7FD8B7FDDFF00FC052FFB16FF00BBFF00F80ACB
      49253D9FF92FFE1FFE49FE47F46FFDEAFF00C0525C624929FFD9FFED0C405068
      6F746F73686F7020332E30003842494D04250000000000100000000000000000
      00000000000000003842494D03ED00000000001000B400000001000100B40000
      000100013842494D042600000000000E000000000000000000003F8000003842
      494D040D000000000004000000783842494D04190000000000040000001E3842
      494D03F3000000000009000000000000000001003842494D040A000000000001
      00003842494D271000000000000A000100000000000000023842494D03F50000
      00000048002F66660001006C66660006000000000001002F6666000100A1999A
      0006000000000001003200000001005A00000006000000000001003500000001
      002D000000060000000000013842494D03F80000000000700000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFF03E800000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFF03E800003842494D040000000000000200023842494D040200000000
      00060000000000003842494D0408000000000010000000010000024000000240
      000000003842494D041E000000000004000000003842494D041A000000000349
      00000006000000000000000000000064000000320000000A0055006E00740069
      0074006C00650064002D00310000000100000000000000000000000000000000
      0000000100000000000000000000003200000064000000000000000000000000
      0000000001000000000000000000000000000000000000001000000001000000
      0000006E756C6C0000000200000006626F756E64734F626A6300000001000000
      000000526374310000000400000000546F70206C6F6E6700000000000000004C
      6566746C6F6E67000000000000000042746F6D6C6F6E67000000640000000052
      6768746C6F6E670000003200000006736C69636573566C4C73000000014F626A
      6300000001000000000005736C6963650000001200000007736C69636549446C
      6F6E67000000000000000767726F757049446C6F6E6700000000000000066F72
      6967696E656E756D0000000C45536C6963654F726967696E0000000D6175746F
      47656E6572617465640000000054797065656E756D0000000A45536C69636554
      79706500000000496D672000000006626F756E64734F626A6300000001000000
      000000526374310000000400000000546F70206C6F6E6700000000000000004C
      6566746C6F6E67000000000000000042746F6D6C6F6E67000000640000000052
      6768746C6F6E67000000320000000375726C5445585400000001000000000000
      6E756C6C54455854000000010000000000004D73676554455854000000010000
      00000006616C74546167544558540000000100000000000E63656C6C54657874
      497348544D4C626F6F6C010000000863656C6C54657874544558540000000100
      0000000009686F727A416C69676E656E756D0000000F45536C696365486F727A
      416C69676E0000000764656661756C740000000976657274416C69676E656E75
      6D0000000F45536C69636556657274416C69676E0000000764656661756C7400
      00000B6267436F6C6F7254797065656E756D0000001145536C6963654247436F
      6C6F7254797065000000004E6F6E6500000009746F704F75747365746C6F6E67
      000000000000000A6C6566744F75747365746C6F6E67000000000000000C626F
      74746F6D4F75747365746C6F6E67000000000000000B72696768744F75747365
      746C6F6E6700000000003842494D042800000000000C000000013FF000000000
      00003842494D041100000000000101003842494D041400000000000400000006
      3842494D040C00000000065B0000000100000032000000640000009800003B60
      0000063F00180001FFD8FFE000104A46494600010201004800480000FFED000C
      41646F62655F434D0002FFEE000E41646F626500648000000001FFDB0084000C
      08080809080C09090C110B0A0B11150F0C0C0F1518131315131318110C0C0C0C
      0C0C110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C01
      0D0B0B0D0E0D100E0E10140E0E0E14140E0E0E0E14110C0C0C0C0C11110C0C0C
      0C0C0C110C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
      FFC00011080064003203012200021101031101FFDD00040004FFC4013F000001
      0501010101010100000000000000030001020405060708090A0B010001050101
      0101010100000000000000010002030405060708090A0B100001040103020402
      0507060805030C33010002110304211231054151611322718132061491A1B142
      23241552C16233347282D14307259253F0E1F163733516A2B283264493546445
      C2A3743617D255E265F2B384C3D375E3F3462794A485B495C4D4E4F4A5B5C5D5
      E5F55666768696A6B6C6D6E6F637475767778797A7B7C7D7E7F7110002020102
      04040304050607070605350100021103213112044151617122130532819114A1
      B14223C152D1F0332462E1728292435315637334F1250616A2B283072635C2D2
      449354A317644555367465E2F2B384C3D375E3F34694A485B495C4D4E4F4A5B5
      C5D5E5F55666768696A6B6C6D6E6F62737475767778797A7B7C7FFDA000C0301
      0002110311003F00F3DEA7D4FA933A965B19977358DBAC0D68B1C0001CE86B46
      E55BF6AF54FF00B997FF00DBAFFF00C925D57FE54CCFF8FB7FEADCA7D33A5DFD
      42DD8CF6B1BABDE7400789409005948049000B2740030FDABD53FEE65FFF006E
      BFFF002497ED5EA9FF00732FFF00B75FFF00925D253D2FA4E33768A8E43FBBDE
      61BF267D2527E174BB46DB314327F3AB2411FD97EE501E6F15D59F374E3F01F8
      84A1C7ED01D784CA227FE2BCCFED5EA9FF00732FFF00B75FFF00924BF6AF54FF
      00B997FF00DBAFFF00C92BBD5BA13B119F68C777AB8E4C6EEE0FEEBC2C853C64
      242C1B0E6E4C73C73309C4C2713528CB421EBBED795FE9ACFF00917D6FA47F9C
      FF004DCFF3BFF089217FF2092456BFFFD0F34EAA27AAE60F1C8B3FEADCBA8C4A
      1B89D3E9A1A21D6B45969F19FA0D5CC75331D5F2CF86459FF56E5D5BC87D7458
      DD5AFA9847C86CFF00BEAADCE12318AEA75767FE2EE384F9EB9EA61094E1FDFF
      004C7FE8C98A4924B39ED1251B5CE34D9AD570D8F1F1FA2EFEC2E3B3B1CE365D
      B49FCC710BAFA985F6318397103EF5CBF5CB1B6F54C87B782F31F7ABBC913EA1
      D34794FF008CF8E032E098F9E71909FF00761C3C1FF4A4EDFF00F20924BFF904
      92BAF3AFFFD1F34EABFF002A667FC7DBFF0056E5B3D0BA95575030321E18E699
      A5E7893CB1DFC972C6EABFF2A667FC7DBFF56E554120C83053670138989EACBC
      BE7C9832C72E23C3381B1FC0BDB595BEB30F6C1EDE07E0A2017101A092780173
      B8BF583A96333D36D9B99FBAED47DCE44B3EB37537B0B18E6D40F3E980DFFA98
      54CF252BD2429E8E3FF1A23C1EAE5CFB9E13F47FD176B3F36BE99438B9C0E5BC
      16B183F301D0B9DFCA5C83DC5EE2E7724C94F65B65AE2EB1C5CE3DCA8AB58B10
      C71A1F52E073BCE65E6F31CB977DA311F2C23FBB17A9FF00E412497FF2092523
      59FFD2F34EABFF002A667FC7DBFF0056E5555AEABFF2A667FC7DBFF56E43A69D
      C373B46849485282AE0F4DBA35808F34A5879608F294DE30B78E2D34958B2869
      05D5F6E42AE9C0DAE06DEA7FF904925FFC8249253FFFD3F35EA827AAE60FFBB1
      6FFD5B949DA06B07007E551EA7FF002B65FF00E18B3FEADCA566AEF90FC8993D
      964F66292492631AED3B483CF8855EF6ECB484742CB337393E1D5931F57A3FFE
      412497FF0020924F5EFF00FFD4F34EABFF002AE67FC7DBFF0056E4F5BC58C03F
      39BDBC426EABFF002A667FC7DBFF0056E55838B4C8408B411629B441060F2921
      0CA7F701D1E22539CB7766807C40099C0567B7E2987E8C6F7691F4478954DEED
      CE253BEC73CCB8A8A7814BC0A0F53FFC82492FFE41248A5FFFD5E1BA87FCDCFB
      7E4FADF6DF57D57FA9B3D2DBBB73B7ECDDEED9B957FF00B16FFBBFFF0080ACB4
      9253A9FF0062DFF77FFF00014BFEC5BFEEFF00FE02B2D2494EA7FD8B7FDDFF00
      FC052FFB16FF00BBFF00F80ACB49253D9FF92FFE1FFE49FE47F46FFDEAFF00C0
      525C624929FFD9003842494D042100000000005300000001010000000F004100
      64006F00620065002000500068006F0074006F00730068006F00700000001200
      410064006F00620065002000500068006F0074006F00730068006F0070002000
      43005300000001003842494D04060000000000070004010100030100FFE11804
      687474703A2F2F6E732E61646F62652E636F6D2F7861702F312E302F003C3F78
      7061636B657420626567696E3D27EFBBBF272069643D2757354D304D70436568
      69487A7265537A4E54637A6B633964273F3E0A3C783A786D706D65746120786D
      6C6E733A783D2761646F62653A6E733A6D6574612F2720783A786D70746B3D27
      584D5020746F6F6C6B697420332E302D32382C206672616D65776F726B20312E
      36273E0A3C7264663A52444620786D6C6E733A7264663D27687474703A2F2F77
      77772E77332E6F72672F313939392F30322F32322D7264662D73796E7461782D
      6E73232720786D6C6E733A69583D27687474703A2F2F6E732E61646F62652E63
      6F6D2F69582F312E302F273E0A0A203C7264663A4465736372697074696F6E20
      7264663A61626F75743D27757569643A37373330326164662D336236332D3131
      64632D623564322D666335343963383638633465270A2020786D6C6E733A6578
      69663D27687474703A2F2F6E732E61646F62652E636F6D2F657869662F312E30
      2F273E0A20203C657869663A436F6C6F7253706163653E343239343936373239
      353C2F657869663A436F6C6F7253706163653E0A20203C657869663A50697865
      6C5844696D656E73696F6E3E35303C2F657869663A506978656C5844696D656E
      73696F6E3E0A20203C657869663A506978656C5944696D656E73696F6E3E3130
      303C2F657869663A506978656C5944696D656E73696F6E3E0A203C2F7264663A
      4465736372697074696F6E3E0A0A203C7264663A4465736372697074696F6E20
      7264663A61626F75743D27757569643A37373330326164662D336236332D3131
      64632D623564322D666335343963383638633465270A2020786D6C6E733A7064
      663D27687474703A2F2F6E732E61646F62652E636F6D2F7064662F312E332F27
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A446573
      6372697074696F6E207264663A61626F75743D27757569643A37373330326164
      662D336236332D313164632D623564322D666335343963383638633465270A20
      20786D6C6E733A70686F746F73686F703D27687474703A2F2F6E732E61646F62
      652E636F6D2F70686F746F73686F702F312E302F273E0A20203C70686F746F73
      686F703A486973746F72793E3C2F70686F746F73686F703A486973746F72793E
      0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A44657363
      72697074696F6E207264663A61626F75743D27757569643A3737333032616466
      2D336236332D313164632D623564322D666335343963383638633465270A2020
      786D6C6E733A746966663D27687474703A2F2F6E732E61646F62652E636F6D2F
      746966662F312E302F273E0A20203C746966663A4F7269656E746174696F6E3E
      313C2F746966663A4F7269656E746174696F6E3E0A20203C746966663A585265
      736F6C7574696F6E3E3138302F313C2F746966663A585265736F6C7574696F6E
      3E0A20203C746966663A595265736F6C7574696F6E3E3138302F313C2F746966
      663A595265736F6C7574696F6E3E0A20203C746966663A5265736F6C7574696F
      6E556E69743E323C2F746966663A5265736F6C7574696F6E556E69743E0A203C
      2F7264663A4465736372697074696F6E3E0A0A203C7264663A44657363726970
      74696F6E207264663A61626F75743D27757569643A37373330326164662D3362
      36332D313164632D623564322D666335343963383638633465270A2020786D6C
      6E733A7861703D27687474703A2F2F6E732E61646F62652E636F6D2F7861702F
      312E302F273E0A20203C7861703A437265617465446174653E323030372D3037
      2D32365432323A33323A31302B31323A30303C2F7861703A4372656174654461
      74653E0A20203C7861703A4D6F64696679446174653E323030372D30372D3236
      5432323A33323A31302B31323A30303C2F7861703A4D6F64696679446174653E
      0A20203C7861703A4D65746164617461446174653E323030372D30372D323654
      32323A33323A31302B31323A30303C2F7861703A4D6574616461746144617465
      3E0A20203C7861703A43726561746F72546F6F6C3E41646F62652050686F746F
      73686F702043532057696E646F77733C2F7861703A43726561746F72546F6F6C
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A203C7264663A446573
      6372697074696F6E207264663A61626F75743D27757569643A37373330326164
      662D336236332D313164632D623564322D666335343963383638633465270A20
      20786D6C6E733A7861704D4D3D27687474703A2F2F6E732E61646F62652E636F
      6D2F7861702F312E302F6D6D2F273E0A20203C7861704D4D3A446F63756D656E
      7449443E61646F62653A646F6369643A70686F746F73686F703A373733303261
      64652D336236332D313164632D623564322D6663353439633836386334653C2F
      7861704D4D3A446F63756D656E7449443E0A203C2F7264663A44657363726970
      74696F6E3E0A0A203C7264663A4465736372697074696F6E207264663A61626F
      75743D27757569643A37373330326164662D336236332D313164632D62356432
      2D666335343963383638633465270A2020786D6C6E733A64633D27687474703A
      2F2F7075726C2E6F72672F64632F656C656D656E74732F312E312F273E0A2020
      3C64633A666F726D61743E696D6167652F6A7065673C2F64633A666F726D6174
      3E0A203C2F7264663A4465736372697074696F6E3E0A0A3C2F7264663A524446
      3E0A3C2F783A786D706D6574613E0A2020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020200A202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020200A20202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020202020200A2020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20200A2020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020200A202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020200A20202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020200A2020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020200A202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020200A20202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      0A20202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020200A2020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020200A202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020200A20202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020200A2020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020200A202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020200A20
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020200A20202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020200A2020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020200A202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020200A20202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020200A2020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020202020200A202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      200A202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020200A20202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020200A2020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020200A202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020200A20202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020200A2020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020202020202020202020200A
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020200A202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020200A20202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020200A2020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020200A202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020200A20202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020202020202020202020202020200A2020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20200A2020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020200A202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020200A20202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020202020200A2020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      202020202020202020202020202020202020202020200A202020202020202020
      2020202020202020202020202020202020202020202020202020202020202020
      20202020202020202020202020200A3C3F787061636B657420656E643D277727
      3F3EFFEE002641646F6265006400000000010300150403060A0D000000000000
      00000000000000000000FFDB0084000604040405040605050609060506090B08
      0606080B0C0A0A0B0A0A0C100C0C0C0C0C0C100C0C0C0C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C010707070D0C0D18101018140E0E0E1414
      0E0E0E0E14110C0C0C0C0C11110C0C0C0C0C0C110C0C0C0C0C0C0C0C0C0C0C0C
      0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0CFFC20011080064003203011100021101
      031101FFC400D000000105010100000000000000000000000002030405060107
      0101000203010100000000000000000000000102030405060710000103030205
      0207010000000000000001000204101103203430121314252131405022322324
      0515110000030504080603000000000000000000010211B11272031031518420
      21613292A23343417122421334A1D25312000102030900000000000000000000
      002100011020305060618191A1B1C11213010001020503050101010000000000
      0001110021102031415130F061718191B1C1A1D1E1FFDA000C03010302110311
      000001F3D2300001A43362EB7D0E9FA05572D2EDF02A32EB6A8A0351CFF51DD7
      EF83B7D2C7753C2E8A5426AF99ECD18BA80B532FD6F9DDDD9405CEB74ECF43D8
      A566F6BCDE437BCEEA0A0229634BB916ACBE244B5450110E81C0354500D443F4
      A0376B47B5B52500AC58B9150EA63E5CDA59508AC58931500672E7D24A80ED28
      53182AD7879326A0A0228F44760D4CA25AA2111C0000BF3FFFDA000801010001
      050293264091DD4A5DD4A5DD4A5DD4A5DD4A5D5CAA56EA3457E77322C5C68E18
      AE52A09C6292B758983147A32C567674F2A93BB3EADA345DD39C1D294ADD4192
      D730B48A67CCD8EC26E54ADD2C7FD0938C3BFA7248739CE3495BAD52B74D65D7
      D2BD13982B2B746A13C59CA4EECFBD72FDEA56E9A79853D91372A56E9754AEA9
      45C4D647F9DD7F16BC5AF16BC5AF16BF557FFFDA0008010200010502E0128E45
      D44D75F464350743FDEA2AF6D58DD365CBC5BFCA3FFFDA0008010300010502E0
      0174C809D002C988B0D60E3F4A67C7CCDAC33F8E8E36158D9F90B5C0D2549BE9
      0E211793C5BABE93ACEB351F03FFDA0008010202063F02BB7FFFDA0008010302
      063F02A27641F5464F51E29E0E843CB66FD4C4DABFFFDA0008010101063F02AA
      45556444B530A23C47597C463ACBE231D65F118EB2F88C7597C4637CFE9C57FB
      B1F3DA2B4EA78615DE2637633C4C7AA9B36A446838A9D992156753C21057ABD4
      AB613DD56A30A4E03242ACEA7842BC0D25691622A19623242B4EA78F8566C32D
      C31AEC3FEA771601A3242B4EA7D8C2534B030C2387CB5069EBB3242B4EA7E964
      8569D4F0D3B85C2E0D2B3242ACEA78668E48559D4FD2C90AD3A9E3695AD3B324
      2B4EA7E9648548BE68A238990B1AD1DFE51DFE51DFE51DFE51DFE51EFF00ABB3
      A7FB7E07FFDA0008010103013F213EC000002B17AEE5FDAEE5FDAEE5FDAEE5FD
      AEE5FDAFF4576BDD5DCB9D6954DDF40A0A0E55A3E35FAA3607C88FE33F757963
      7DCF0E3BBBEBEAD8012FD1FB8C86FD9FD747DABCAA8C3DCB9D200D93D88FCC5C
      8DC15A012B0F72E745F5D174F47C34DC18A05602576A765938F3B77CF8A645AB
      87B973A1464AF98C43FB49001D627D2A50C9E71F72E79FDCB9D44D0A59A7CAA7
      71A51C3A98FB773AB0381F78A866A60C3DDB9D7D47D64D4C3DCB9D40989F1B42
      AF187B973A14D28DDBFAD7101ED4C5F1FEBDC8989BC4E939C924ABFFDA000801
      0203013F21E8414BB50A8722563189A31191A319E930DD72A5A01D45C134391C
      EE4314C432C5474FFFDA0008010303013F21E83A82EBA156AF8F1FE9FF002A0D
      C1F43F51514F63B3E9904E46C780D7E5C4DCDCBFA8FF0074C930F0A3F33FB8C8
      2EC4FC64D5BCDE3CD0B2A4F14B144357B21FB974853D18FAAD78FA95FBEBE339
      C64D59C6233474FF00FFDA000C0301030211031100001000000006C821B48025
      AF811580092A8040240289409D2480092C01E800256A0124927FFFDA00080101
      03013F100B244A08020019B264C9932772BEE61725876D405AAB415A65CAEF83
      A3D5A5CB5DC23FAA97DED1121787671983C8500C418355666F018A25C391A6CF
      737A74ED3FC1C281DD06A19D94F86B4F9C560E4478975AD962BE71E412687472
      EB513F2DB93A2722593D28F3AC004ABE8504344A8A443070D28BCCAAAFAE3C80
      121344A2111DBFE52AB4DB2ECF814C9774AA72F24350F197927120DF9F051A26
      9CCD5F84A56D077891FB699CBC9D4FF9490C61127CD208B2027D5138C3C24353
      91B34676CE358C64760C8C61E5C2A1A90652D407278F4A4451212C8E021D0D4D
      AAECD222DF1E476543460891B081B7BD3B8868806A4CE7A54AA0C8B6DB43FFDA
      0008010203013F10E8199698D947D680B644E118B934A4C605884B142CC60C9A
      D20C383AE535E2B46283A7052AA752E477C468C757494D4644D4683A5FFFDA00
      08010303013F10E81F3A44929D5C576A1D958D790CC517F1D06416B2502035C6
      9C741350E3325F4581C6A0095829EAC1CB25659F3543C751B4A052B6A950E43B
      C62A19E9D3DCC6ECE541A871D3FFD9}
  end
  object Label11: TLabel
    Left = 616
    Top = 320
    Width = 6
    Height = 13
    Caption = '0'
  end
  object Label12: TLabel
    Left = 432
    Top = 368
    Width = 47
    Height = 13
    Caption = 'Failed List'
  end
  object Sort: TButton
    Left = 200
    Top = 24
    Width = 75
    Height = 20
    Caption = 'Sort'
    TabOrder = 0
    OnClick = Start
  end
  object ListBox1: TListBox
    Left = 16
    Top = 414
    Width = 121
    Height = 142
    AutoComplete = False
    ExtendedSelect = False
    ItemHeight = 13
    TabOrder = 1
    OnClick = ListBox1Click
  end
  object ListBox2: TListBox
    Left = 264
    Top = 414
    Width = 121
    Height = 142
    AutoComplete = False
    ExtendedSelect = False
    ItemHeight = 13
    TabOrder = 2
    OnClick = ListBox2Click
  end
  object Stop: TButton
    Left = 308
    Top = 24
    Width = 75
    Height = 20
    Caption = 'Stop'
    TabOrder = 3
    OnClick = StopClick
  end
  object Edit1: TEdit
    Left = 16
    Top = 24
    Width = 153
    Height = 21
    TabOrder = 4
  end
  object Panel1: TPanel
    Left = 16
    Top = 288
    Width = 377
    Height = 89
    BorderStyle = bsSingle
    Color = clGray
    TabOrder = 5
    object Label4: TLabel
      Left = 8
      Top = 12
      Width = 61
      Height = 13
      Caption = 'Total Friends'
    end
    object Label5: TLabel
      Left = 8
      Top = 36
      Width = 34
      Height = 13
      Caption = 'Friends'
    end
    object Label6: TLabel
      Left = 8
      Top = 60
      Width = 63
      Height = 13
      Caption = 'Other Friends'
    end
    object Label7: TLabel
      Left = 192
      Top = 12
      Width = 6
      Height = 13
      Caption = '0'
    end
    object Label8: TLabel
      Left = 192
      Top = 36
      Width = 6
      Height = 13
      Caption = '0'
    end
    object Label9: TLabel
      Left = 192
      Top = 60
      Width = 6
      Height = 13
      Caption = '0'
    end
  end
  object ComboBox1: TComboBox
    Left = 136
    Top = 382
    Width = 121
    Height = 21
    ItemHeight = 13
    TabOrder = 6
    Text = 'ComboBox1'
    Items.Strings = (
      'http://www.google.com'
      'http://www.experts-exchange.com'
      'http://www.xtra.co.nz'
      'http://www.delphi.com')
  end
  object ComboBox2: TComboBox
    Left = 488
    Top = 344
    Width = 113
    Height = 21
    ItemHeight = 13
    TabOrder = 7
    Text = 'ComboBox2'
  end
  object Button1: TButton
    Left = 160
    Top = 532
    Width = 81
    Height = 33
    Caption = 'Finished'
    TabOrder = 8
    OnClick = Button1Click
  end
  object WebBrowser1: TWebBrowser
    Left = 16
    Top = 56
    Width = 377
    Height = 217
    TabOrder = 9
    ControlData = {
      4C000000F72600006D1600000000000000000000000000000000000000000000
      000000004C000000000000000000000001000000E0D057007335CF11AE690800
      2B2E126208000000000000004C0000000114020000000000C000000000000046
      8000000000000000000000000000000000000000000000000000000000000000
      00000000000000000100000000000000000000000000000000000000}
  end
  object Memo1: TMemo
    Left = 408
    Top = 96
    Width = 281
    Height = 177
    Lines.Strings = (
      'Memo1')
    ScrollBars = ssBoth
    TabOrder = 10
    WordWrap = False
  end
  object ProgressBar1: TProgressBar
    Left = 408
    Top = 296
    Width = 281
    Height = 17
    Step = 1
    TabOrder = 11
  end
  object FailedList: TMemo
    Left = 432
    Top = 384
    Width = 217
    Height = 169
    Lines.Strings = (
      'Memo1')
    ScrollBars = ssBoth
    TabOrder = 12
    WordWrap = False
  end
  object Button2: TButton
    Left = 416
    Top = 32
    Width = 241
    Height = 33
    Caption = 'Delphi,Expert'
    TabOrder = 13
    OnClick = Button2Click
  end
end


Unit1.pas
========
unit unit1;

interface

uses

  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, SHDocVw_TLB, Menus, ExtCtrls, shellapi,WinInet,
  ComCtrls, jpeg, SHDocVw;

type

  TMyThread    =  class(TThread)
  private
     internetFile,localFileName:String;
     FMyForm:TForm;
     FSearchString:TStringList;
     FFound:Boolean;
     progress:Integer;
     Persentage:Extended;
     FMemoUpdate:String;
  protected
     procedure Execute; override;
     procedure FileNotFound;
     procedure UpdateForm;
     procedure UpdateMemo1;
  public
    constructor Create(Form: TForm;SearchString:String);
    destructor Destroy; override;

  published
     property OnTerminate;
  end;


  TFormSort = class(TForm)
    Sort: TButton;
    ListBox1: TListBox;
    Label1: TLabel;
    ListBox2: TListBox;
    Label2: TLabel;
    Label3: TLabel;
    Stop: TButton;
    Edit1: TEdit;
    Label10: TLabel;
    Panel1: TPanel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Bevel1: TBevel;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Image1: TImage;
    Button1: TButton;
    WebBrowser1: TWebBrowser;
    Memo1: TMemo;
    ProgressBar1: TProgressBar;
    Label11: TLabel;
    FailedList: TMemo;
    Label12: TLabel;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
    procedure ListBox2Click(Sender: TObject);
    procedure Com2save(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Start(Sender: TObject);
    procedure StopClick(Sender: TObject);
    procedure Button2Click(Sender: TObject);

  private
    { Private declarations }
    Complete:Boolean;
  public
    { Public declarations }
  end;

var
  FormSort: TFormSort;

implementation

{$R *.dfm}

function GetInetFile (const fileURL, FileName: String): boolean;
const
  BufferSize = 1024;
var
  hSession, hURL: HInternet;
  Buffer: array[1..BufferSize] of Byte;
  BufferLen: DWORD;
  f: File;
  sAppName: string;
begin
 result := false;
 sAppName := ExtractFileName(Application.ExeName) ;
 hSession := InternetOpen(PChar(sAppName), INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0) ;
 try
  hURL := InternetOpenURL(hSession, PChar(fileURL), nil, 0, 0, 0) ;
  try
   AssignFile(f, FileName) ;
   Rewrite(f,1) ;
   repeat
    InternetReadFile(hURL, @Buffer, SizeOf(Buffer), BufferLen) ;
    BlockWrite(f, Buffer, BufferLen)
   until BufferLen = 0;
   CloseFile(f) ;
   result := True;
  finally
   InternetCloseHandle(hURL)
  end
 finally
  InternetCloseHandle(hSession)
 end
end;

function SearchFile (const FileName,SearchString: String): boolean;
  var MyStrLst:TStringList;
begin
  result := false;
  try
     MyStrLst:=TStringList.Create;
     MyStrLst.LoadFromFile(FileName);
     Result:= Pos(SearchString,AnsiUpperCase(MyStrLst.Text))>0;
  finally
     MyStrLst.Free;
  end;
end;

{========================================================================}

procedure TMyThread.Execute;
var i:Integer;
    NormalExit:Boolean;
    MyStrLst:TStringList;
    j:Integer;
begin
 try
  MyStrLst:=TStringList.Create;
  NormalExit:= True;
  for i:=0 to TFormSort(FMyForm).ComboBox1.Items.Count-1 do
  begin
    internetFile:={'http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+}
                                                     TFormSort(FMyForm).ComboBox1.Items.Strings[i];
    if GetInetFile(internetFile,localFileName) then
    begin
      MyStrLst.LoadFromFile(localFileName);
      for j:=0 to FSearchString.Count-1 do
      begin
         FFound:=Pos(AnsiUpperCase(FSearchString.Strings[j]),
                                          AnsiUpperCase(MyStrLst.Text))>0;
         if FFound then
         begin
            FMemoUpdate:=FSearchString.Strings[j];
            Synchronize(UpdateMemo1);
         end;
      end;
    end
    else Synchronize(FileNotFound);
    progress:=i+1;
    Persentage := ((i+1)/ TFormSort(FMyForm).combobox1.Items.count) * 100;
    Synchronize(UpdateForm);
    if TFormSort(FMyForm).label3.caption = '0' then
    begin
      NormalExit:=False;
      Break;
    end;
  end;
  TFormSort(FMyForm).Complete:=NormalExit;
 finally
   MyStrLst.Free;
 end;
end;

constructor TMyThread.Create(Form: TForm;SearchString:String);
begin
  FreeOnTerminate:=True;
  FMyForm :=Form;
  OnTerminate:=TFormSort(FMyForm).Com2save;
  localFileName:=ExtractFilePath(ParamStr(0))+ 'data.txt';
  FSearchString:=TStringList.Create;
  FSearchString.Text:=SearchString;
  Inherited Create(False);
end;

destructor TMyThread.Destroy;
begin
  FSearchString.Free;
  inherited Destroy;
end;

procedure TMyThread.FileNotFound;
begin
  TFormSort(FMyForm).FailedList.Lines.Add(internetFile);
end;

procedure TMyThread.UpdateForm;
begin
   TFormSort(FMyForm).progressbar1.position := progress;
   TFormSort(FMyForm).label11.Caption := inttostr(round(Persentage)) + ' ' + '%' + ' ' + 'complete';
   if FFound then
     TFormSort(FMyForm).Label8.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label8.Caption)+1)
   else TFormSort(FMyForm).Label9.Caption:=IntToStr(
                                 StrToInt(TFormSort(FMyForm).Label9.Caption)+1);
end;

procedure TMyThread.UpdateMemo1;
begin
  TFormSort(FMyForm).Memo1.Lines.Add(FMemoUpdate+' found in '+internetFile);
end;


{========================================================================}

procedure TFormSort.Com2save(Sender: TObject);
var fname,path,report1,report2 : string;
begin
  if Complete then
  begin
   fname := 'report.html';
   path := ExtractFilePath(ParamStr(0));
   if FileExists(path+ 'media\' + 'red.jpg') then
      image1.Picture.LoadFromFile(path+ 'media\' + 'red.jpg');
   label3.caption := '0';
   report1 := '<font color=blue>' + label5.caption + ' = ' + '<font color=red>' + label8.caption +'</font><br><br>';
   combobox2.Items.Add (report1);
   report2 := '<font color=blue>Other Friends = ' + '<font color=red>' + label9.caption + '</font><br><br>' + #10#13 + '</HTML>';
   combobox2.Items.Add (report2);
   combobox2.Items.SaveToFile(path + 'html\' + fname);
   listbox1.Items.SaveToFile(path + 'lists\' + edit1.Text + '.rba');
   webbrowser1.Navigate (path + 'html\' + fname);
  end
  else ShowMessage('Canceled');
  Edit1.Enabled:=True;
end;


procedure TFormSort.FormCreate(Sender: TObject);
var fname,path : string;
begin
  fname := 'all.rba';
  path := ExtractFilePath(ParamStr(0));
  if fileexists (path + 'lists\' + fname) then
  combobox1.Items.LoadFromFile(path + 'lists\' + fname);
  combobox1.ItemIndex := 0;
  label7.caption := inttostr(combobox1.Items.count);
  if fileexists (path + 'html\' + 'report.html') then
    combobox2.Items.LoadFromFile(path + 'html\' + 'report.html');
  progressbar1.Max := combobox1.Items.count -1;
end;

procedure TFormSort.Start(Sender: TObject);
var t,path : string;
begin
  if edit1.text= '' then exit;
  t:= AnsiUpperCase(edit1.Text);
  label5.caption := t + ' ' + 'Friends';
  label2.Caption := t;
  label3.caption := '1';

  path := ExtractFilePath(ParamStr(0))+'media\';
  ProgressBar1.Position:=0;
  ProgressBar1.Max:=ComboBox1.Items.Count;
  if fileexists (path+'green.jpg') then
     image1.Picture.LoadFromFile(path+'green.jpg');
  edit1.enabled := false;
  TMyThread.Create(Self,t);
end;

procedure TFormSort.StopClick(Sender: TObject);
var path : string;
begin
   edit1.Enabled := true;
   path := ExtractFilePath(ParamStr(0))+'media\';
   label3.caption := '0';
   if fileexists (path+'red.jpg') then
      image1.Picture.LoadFromFile(path+'red.jpg');
end;


procedure TFormSort.ListBox1Click(Sender: TObject);
var s,path: string;
begin
   edit1.Enabled := true;
   path := ExtractFilePath(ParamStr(0))+'media\';
   label3.caption := '0';
   if fileexists (path+'red.jpg') then
   image1.Picture.LoadFromFile(path+'red.jpg');
   s:= (listbox1.Items[listbox1.itemindex]);
   webbrowser1.Navigate('http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s);
end;

procedure TFormSort.ListBox2Click(Sender: TObject);
var s,path: string;
begin
   edit1.Enabled := true;
   path := ExtractFilePath(ParamStr(0))+'media\';
   label3.caption := '0';
   if fileexists (path + 'red.jpg') then
   image1.Picture.LoadFromFile(path+'red.jpg');
   s:= (listbox2.Items[listbox2.itemindex]);
   webbrowser1.Navigate('http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid='+ s);
end;



procedure TFormSort.Button1Click(Sender: TObject);
begin
  FormSort.Close;
end;


procedure TFormSort.Button2Click(Sender: TObject);
begin
 Memo1.Clear;
 label3.caption := '1';
 TMyThread.Create(Self,'Delphi'+#13#10+'Expert');
end;

end.
0
 
LVL 20

Author Comment

by:Mark Brady
ID: 19644372
Thankk you so much.  This will give me lots of reading and learning !

Elvin
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question