DelphiFAQ Home Search:
General :: Programming :: Delphi :: Network
Network (local network and Internet) programming under Windows with Delphi.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Progress bar with the TWebBrowser component

Question:

How can I make the TWebBrowser component display a progress bar?

Answer:

The TWebBrowser component cannot display a progress bar on its own. You need to add a TProgressBar component from the Win32 component palette and hook into the TWebBrowser.OnProgressChange event as shown in the code below.

procedure TForm1.WebBrowser1ProgressChange(Sender: TObject;
                    Progress, ProgressMax: integer);
 begin { TForm1.WebBrowser1ProgressChange }
   if Progress>0 then
   begin
     ProgressBar1.MaxValue := ProgressMax;
     ProgressBar1.Position := Progress
   end { Progress>0 }
   else
     ProgressBar1.Progress := 0
 end; { TForm1.WebBrowser1ProgressChange }
 
You don't like the formatting? Check out SourceCoder then!
Generated 16:01:33 on Jan 18, 2017