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 6597359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:11:56+00:00 2026-05-25T18:11:56+00:00

I have an (Delphi XE2) VCL app containing an object TDownloadUrl (VCL.ExtActns) to check

  • 0

I have an (Delphi XE2) VCL app containing an object TDownloadUrl (VCL.ExtActns) to check several webpages, so I wonder if there is an equivalent object in FireMonkey, ’cause I wanna take advantage of rich features from this new platform.

A Firemonkey app demo using threads would appreciate. Thanks in advance.

  • 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-05-25T18:11:56+00:00Added an answer on May 25, 2026 at 6:11 pm

    Actions don’t exist yet with FireMonkey.

    BTW, you can create the same behavior with a code like this:

    IdHTTP1: TIdHTTP;
    

    …

    procedure TForm2.MenuItem1Click(Sender: TObject);
    const
      FILENAME = 'C:\Users\Whiler\Desktop\test.htm';
      URL      = 'http://stackoverflow.com/questions/7491389/firemonkey-and-tdownloadurl';
    var
    //  sSource: string;
      fsSource: TFileStream;
    begin
      if FileExists(FILENAME) then
      begin
        fsSource := TFileStream.Create(FILENAME, fmOpenWrite);
      end
      else
      begin
        fsSource := TFileStream.Create(FILENAME, fmCreate);
      end;
    
      try
        IdHTTP1.Get(URL, fsSource);
      finally
        fsSource.Free;
      end;
    //  sSource := IdHTTP1.Get(URL);
    end;
    

    The commented lines can replace the others if you just need the source in memory…



    If you want to use a thread, you can manage it like this:

    unit Unit2;
    
    interface
    
    uses
      System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
      FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, FMX.Menus;
    
    type
      TDownloadThread = class(TThread)
      private
        idDownloader: TIdHTTP;
        FFileName   : string;
        FURL        : string;
      protected
        procedure Execute; override;
        procedure Finished;
      public
        constructor Create(const sURL: string; const sFileName: string);
        destructor  Destroy; override;
      end;
    type
      TForm2 = class(TForm)
        MenuBar1: TMenuBar;
        MenuItem1: TMenuItem;
        procedure MenuItem1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form2: TForm2;
    
    implementation
    
    {$R *.fmx}
    
    procedure TForm2.MenuItem1Click(Sender: TObject);
    const
      FILENAME = 'C:\Users\Whiler\Desktop\test.htm';
      URL      = 'http://stackoverflow.com/questions/7491389/firemonkey-and-tdownloadurl';
    var
    //  sSource: string;
      fsSource: TFileStream;
    begin
      TDownloadThread.Create(URL, FILENAME).Start;
    end;
    
    { TDownloadThread }
    
    constructor TDownloadThread.Create(const sURL, sFileName: string);
    begin
      inherited Create(true);
      idDownloader := TIdHTTP.Create(nil);
      FFileName       := sFileName;
      FURL            := sURL;
      FreeOnTerminate := True;
    end;
    
    destructor TDownloadThread.Destroy;
    begin
      idDownloader.Free;
      inherited;
    end;
    
    procedure TDownloadThread.Execute;
    var
    //  sSource: string;
      fsSource: TFileStream;
    begin
      inherited;
      if FileExists(FFileName) then
      begin
        fsSource := TFileStream.Create(FFileName, fmOpenWrite);
      end
      else
      begin
        fsSource := TFileStream.Create(FFileName, fmCreate);
      end;
    
      try
        idDownloader.Get(FURL, fsSource);
      finally
        fsSource.Free;
      end;
      Synchronize(Finished);
    end;
    
    procedure TDownloadThread.Finished;
    begin
      // replace by whatever you need
      ShowMessage(FURL + ' has been downloaded!');
    end;
    
    end.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application written in delphi-xe2, now i'm adding VCL styles support, So
I have to display some modified 'masked' value in a VCL TDBGrid (Delphi XE2),
I have a Delphi XE2 project having components like Label1 , BitBtn1 and Image1
I have developed an database application with Delphi XE2 using an Access DB, now
I have several Delphi programs that maintain connections to a database (some Oracle, some
I'm using Delphi XE2 with FireMonkey. I have read many other questions about MD5
I have a Delphi XE2 Firemonkey application that I want to run on both
Here I have my Windows laptop with Delphi XE2 and Firemonkey. I've written a
I have a simple piece of code, that compiles in Delphi XE2 but not
I am trying to write an iPhone app using Delphi XE2 / FireMonkey and

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.