How to download a file to the local PC asynchonously

 
procedure TfmTestDownloader.btDownLoadClick(Sender: TObject);   
begin   
   if clDownloader1.IsBusy then Exit;   
 
   clDownloader1.URL :=
        'http://www.clevercomponents.com/images/testimage.jpg';   
   clDownloader1.LocalFolder := 'c:\downloads';   
   clDownLoader1.Start();   
end;  
 
procedure TfmTestDownloader.clDownLoader1StatusChanged(
    Sender: TObject; Status: TclProcessStatus);   
begin   
   case Status of   
      psSuccess: ShowMessage('Process completed successfully');   
      psFailed: ShowMessage((Sender as TclDownLoader).Errors.Text);   
      psTerminated: ShowMessage('Process stopped');   
      psErrors: ShowMessage('Process completed with some warnings');   
   end;   
end;

Add Feedback