Solved

TWebBrowser Status - Progress

Posted on 2008-10-03
4
375 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert GUI app into console app for Win32 Env 5 82
Working with hours 3 46
Create a path if not exists 7 69
TEMBEDDEDWB how can i change its user agent ? 8 50
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now