--- ---

The following code implements incremental search of list box using text typed into edit control.

    procedure TListBoxSearchForm.Edit1Change(Sender: TObject) ;
    const
      indexStart = -1;
    var
      search : array[0..128] of Char;
    begin
      //make sure Length(Edit1.Text) <= 128
      StrPCopy(search, Edit1.Text) ;
      ListBox1.ItemIndex := ListBox1.Perform(
        LB_SELECTSTRING, indexStart, LongInt(@search)
      );
    end;