Autor Beitrag
NeoXan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 81

WinXP Sp1 Home
D7 Prof
BeitragVerfasst: Mo 19.01.04 13:39 
Moin,

also ich rufe in meiner procedure 2 URLs auf...und möchte aber, dass der Webbrowser erst die 2 URL aufruft bzw. Handlung ausführt, wenn die 1 komplett geladen wurde...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
//1. URL
while pbProgress.Percent < 100 do
  Application.HandleMessage;
//2. URL


Ich habe es auch schon so probiert dass bei OnDownloadBegin eine Variable auf true gesetzt wird und bei beendigung dann halt auf false und dann

ausblenden Delphi-Quelltext
1:
2:
3:
4:
//1. URL
while isDownloading do
  Application.HandleMessage;
//2. URL


Aber trotzdem überspringt er manche Procedure einfach bzw. geht so schnell, dass der Browser gar keine Zeit zum navigieren bekommt...

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
//1. URL
while isDownloading do
  Application.HandleMessage;
//2. URL
while isDownloading do
  Application.HandleMessage;
//3. URL
while isDownloading do
  Application.HandleMessage;

etc.


mfg
NeoXan
ixtreme
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mo 19.01.04 14:08 
setz doch das ereignis einfach in ondocumentcomplete!

gruß

ixtreme.de
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mo 19.01.04 20:46 
...oder besser so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure WB_Waiting_for_completion(WB: TWebbrowser);
begin
while WebBrowser.ReadyState <> READYSTATE_COMPLETE do
begin
  Application.ProcessMessages;
end;


//Lade 1. URL .... dann warte
WB_Waiting_for_completion(Webbrowser1);
//Lade 2. URL .... dann warte
WB_Waiting_for_completion(Webbrowser1);
//Lade 3. URL .... dann warte
WB_Waiting_for_completion(Webbrowser1);