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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:26:09+00:00 2026-05-27T04:26:09+00:00

I am using the Open Source Abbrevia Components to Archive some Files into a

  • 0

I am using the Open Source Abbrevia Components to Archive some Files into a single Zip, whilst this is happening I am using the TAbMeter Gauge to display the progress.

I would prefer to use the TProgressBar for this purpose instead though (maintaining a standard interface with Windows).

How may I use a TProgressBar instead of the TAbMeter? I know I could code the progress myself, but seeing as the Abbrevia Components already have this done in the TAbMeter, I see no sense in rewriting it.

If I could even access the Position property of the TAbMeter I could simulate the TProgressBar’s progress by synchronizing with the TAbMeter.

Here is a snippet, FileNames is a TStringList containing the Filenames to archive..

procedure ArchiveFiles(SaveAs: string; ProgressBar: TAbMeter);
var
  AZipper: TAbZipper;
  i: Integer;
begin
  AZipper := TAbZipper.Create(nil);
  try
    AZipper.AutoSave := False;
    AZipper.BaseDirectory := ExtractFilePath(SaveAs);
    AZipper.ArchiveSaveProgressMeter := ProgressBar;
    AZipper.FileName := SaveAs;
    AZipper.StoreOptions := AZipper.StoreOptions + [soStripDrive, soRemoveDots]
                                                 - [soStripPath];
    AZipper.TempDirectory := GetTempDirectory;

    try
      Screen.Cursor := crHourGlass;
      ProgressBar.Visible := True;

      for i := 0 to FileList.Count - 1 do
      begin
        AZipper.AddFiles(FileList.Strings[i], 0);
      end;

    finally
      AZipper.Save;
      AZipper.CloseArchive;

      ProgressBar.Visible := False;
      Screen.Cursor := crDefault;
    end;

  finally
    AZipper.Free;
  end;
end;
  • 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-27T04:26:10+00:00Added an answer on May 27, 2026 at 4:26 am

    You are presumably setting the ArchiveSaveProgressMeter somewhere in your code. You can simply stop doing this and instead set the OnArchiveSaveProgress event. Then you need to supply an event with this signature:

    procedure(Sender: TObject; Progress: Byte; var Abort: Boolean) of object;
    

    You would respond to receipt of such an event by updating the Position value of the progress bar in your UI.

    The method that surfaces this progress event also handles the progress meter version:

    procedure TAbCustomZipper.DoArchiveSaveProgress(
      Sender: TObject; Progress: Byte; var Abort : Boolean);
    begin
      Abort := False;
      if Assigned(FArchiveSaveProgressMeter) then
        FArchiveSaveProgressMeter.DoProgress(Progress);
      if Assigned(FOnArchiveSaveProgress) then
        FOnArchiveSaveProgress(Self, Progress, Abort);
    end;
    

    So the designers of the component have simply provided two alternative routes to receiving progress: the meter or a callback.


    In order to handle progress from a callback you need to write a method like this:

    procedure TMyMainForm.OnArchiveSaveProgress(
      Sender: TObject; Progress: Byte; var Abort: Boolean);
    begin
      FProgressBar.Position := Progress;
    end;
    

    You then assign this event handler to OnArchiveSaveProgress, most likely in the IDE. It’s an identical procedure to assigning an OnClick event to a button.


    Note: I’ve never used Abbrevia so I may have picked out a different component from the one you are using. However, all the components that interact with meters, also offer progress via a callback so this basic approach will work no matter which component you use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a open-source Python library in my project. This library logs a lot
say a company is using Open source libraries, or programs, and packaging it into
I'm using a open-source library for i2c bus actions. This library frequently uses a
Alright, I'm at my wits end with this one. I am using an open-source
I have been using an open source Java project and had to make some
I'm new to using open source libraries in production code so when it says
I am using the open source Javascript WYSIWYG from OpenWebWare and Asp.Net RequiredFieldValidator on
I am using an open source client to programmatically process incoming emails (on Windows
I am using an open source .Net library which uses MSMQ underneath. After about
I have been trying to do a fill using the open source Srecord Program.

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.