Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8199883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:15:45+00:00 2026-06-07T06:15:45+00:00

I am trying to download a file while having the status shown in a

  • 0

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

I followed the instructions located here:
http://delphi.about.com/cs/adptips2003/a/bltip0903_2.htm

Here is my code:

unit unitUpdate;

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
    procedure URL_OnDownloadProgress
        (Sender: TDownLoadURL;
         Progress, ProgressMax: Cardinal;
         StatusCode: TURLDownloadStatus;
         StatusText: String; var Cancel: Boolean) ;
         function DoDownload: boolean;
  public
    { Public declarations }
  end;

var
  Form5: TForm5;

implementation

{$R *.dfm}

procedure TForm5.URL_OnDownloadProgress;
begin
   ProgressBar1.Max:= ProgressMax;
   ProgressBar1.Position:= Progress;
end;

function TForm5.DoDownload: Boolean;
begin
  ShowMessage('A new update is available!');
  savedialog1.Title := 'Save Update';
  savedialog1.Filter := 'Exe Files (*.exe)|*.exe';
  savedialog1.Execute;
  if savedialog1.filename = '' then
    Application.Terminate
  else begin
   with TDownloadURL.Create(self) do
   try
     URL:='linktofile';
     FileName := savedialog1.FileName + '.exe';
     OnDownloadProgress := TForm5.URL_OnDownloadProgress;

     ExecuteTarget(nil) ;
   finally
     Free;
   end;
  end;
end;

end.

Upon compiling i get the following error:

[DCC Error] unitUpdate.pas(50): E2010 Incompatible types: 'TDownloadProgressEvent' and 'Procedure'

It is referring to this line of code:

OnDownloadProgress := TForm5.URL_OnDownloadProgress;

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

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:15:47+00:00Added an answer on June 7, 2026 at 6:15 am

    TForm5.URL_OnDownloadProgress is not a valid sentence, you must use the instance of the form (not the tyoe) instead, so try writting something like so

     OnDownloadProgress := Self.URL_OnDownloadProgress;
    

    or

     OnDownloadProgress := URL_OnDownloadProgress;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem here trying to upload a file with powershell. What I'm
I'm trying to download a file over HTTP and store its contents in a
I am trying to perform a http-get-request and show the download progress to the
I'm having a really strange problem. I'm trying to download some file and store.
i'm trying to download file from http server using WinINet library calls. It works
I am trying to download mp3 file to users machine without his/her consent while
I am trying to download an mp3 file from google TTS API, here is
I am trying to download a file from a website using python and mechanize.
I'm trying to download a file, but its downloading it as a directory, and
I am trying to download a file using simple java class using the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.