{
FileSearch, ShowMessage example
The following example uses an edit control and a button on a form. When the button is clicked, the current directory is searched for the filename specified in the edit control. A message box indicates whether the file is found.
} 
procedure TForm1.Button1Click(Sender: TObject);
var
  FileToFind: string;
begin
  FileToFind := FileSearch(Edit1.Text, GetCurrentDir);
  if FileToFind = '' then
    ShowMessage('Couldn''t find ' + Edit1.Text + '.')
  else
    ShowMessage('Found ' + FileToFind + '.');
end; 
