Solved

TWebBrowser Status - Progress

Posted on 2008-10-03
4
402 Views
Last Modified: 2012-05-05
How do Implement a Progress Bar - when displaying a WebPage in a TWebBrowser. I would like to show the progress as the page is loading....just like all webbrowsers do

thanks
0
Comment
Question by:geocoins-software
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 21

Expert Comment

by:ziolko
ID: 22637416
set progressbar min := max := 100;

and use OnProgressChange() of TWebBrowser like this:

procedure TForm1.WebBrowser1ProgressChange(Sender: TObject; Progress,
  ProgressMax: Integer);
begin
  if ProgressMax <> 0 then
    ProgressBar1.Position := Trunc((Progress / ProgressMax) * 100) + 1
  else
    ProgressBar1.Position := 0;
end;


ziolko.
0
 

Author Comment

by:geocoins-software
ID: 22637570
set progressbar min := max := 100;

?????

set both to 100 ?
0
 
LVL 21

Accepted Solution

by:
ziolko earned 250 total points
ID: 22637585
>>set both to 100 ?
oops typo, of course min := 0

and use this:

procedure TForm1.WebBrowser1ProgressChange(Sender: TObject; Progress,
  ProgressMax: Integer);
begin
  if ProgressMax <> 0 then
    ProgressBar1.Position := Trunc((Progress / ProgressMax) * ProgressBar1.Max) + 1
  else
    ProgressBar1.Position := 0;
end;

then no matter what max will be:)

ziolko.
0
 

Author Comment

by:geocoins-software
ID: 22637653
Works Nice!  THanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 9 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question