delphi - Incompatible types: 'TDownloadProgressEvent' and 'Procedure' -


I am trying to download a file during the status shown in a progress bar.

Instructions located at:

Here's my code:

  Unit entity update; Interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, StdCtrls, ComCtrls, ExtActns; Type TForm5 = Class (TForm) ProgressBar1: TProgressBar; SaveDialog1: TSaveDialog; Private Process URL _On Download Progress (Sender: TDOUKE URL: PROGRESS, PROMINCE MAX: CARDINAL; STATES: TURNAL DOWNLOAD STATES; STATESEX: STRONG; var CANCEL: Boolean); DoDownload function: boolean; Public {public declaration} end; Verse form 5: tform 5; Implementation {$ R *. Dfm} Process TForm5.URL_OnDownloadProgress; Start progress bar 1. Max: = Progress Max; Progress 1 Composition: = Progress; End; Function TForm5. Download: Boolean; Start ShowMessage ('a new update is available!'); Savedialog1.Title: = 'Save update'; Savedialog1.Filter: = 'Exe files (* .exe) | * .exe '; Savedialog1.Execute; If savedialog1.filename = '' then application Otherwise start with TDownloadURL. Try Create URL (itself): = 'linktofile'; Filename: = Saved 1 .FileName + '.exe'; OnDownload Progress: = TForm5.URL_On Download Download Progress; ExecuteTarget (zero); finally free; End; End; End; End.   

I get the following error on the compilation:

  [DCC error] unitUpdate.pas (50): E2010 Incompatible Type: 'TDownloadProgressEvent' and 'Process '  

This is a reference to this line of code:

  On Download Progress: = TForm5.URL_OnDownloadProgress;   

I'm having trouble fixing this error. Any help would be greatly appreciated.

Thank you.

TForm5.URL_OnDownloadProgress is not a valid sentence; No tyoe) should be used, so try some writting as soon as

  onload progress: = self.URL_OnDownloadProgress;   

or

  On Download Progression: = progress of URL_On Download;    

Comments