Autor Beitrag
oern
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 142

Linux, Win XP
D7
BeitragVerfasst: Fr 28.10.05 19:33 
Hi, gibt es eine möglichkeit ein einem TWebbrowser eine Seite zuladen und dann warten bis diese Seite fertig geladen wurde ?

thx für eure Antworten
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: So 30.10.05 09:28 
einfallen würde mir da nur ein umweg über die indykomponente idhttp
Da gibts ein OnLoad.
Wenn eine Seite angefordert wird lädst du sie einfach mit der idhttp kompo runter und onload lädst du sie lokal von der Platte in den Webbrowser.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
Holgerwa
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 325

WIN XP Pro, Vista Business
Delphi 7 Pro, BDS 2006 Pro
BeitragVerfasst: So 30.10.05 10:25 
Hallo,

im Event OnDocumentComplete des TWebBrowsers machst Du das hier ein:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure WebBrowser1.DocumentComplete(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);
var CurWebBrowser: IWebBrowser;
    TopWebBrowser: IWebBrowser;
begin
  CurWebBrowser := pDisp as IWebBrowser;
  TopWebBrowser := TWebBrowser (Sender).DefaultInterface;
  if CurWebBrowser = TopWebBrowser then
    ShowMessage ('Fertig geladen');
end;

Die Bedingung ist erst dann erfüllt, wenn sämtliche Teile im WebBrowser geladen sind.

Holger
oern Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 142

Linux, Win XP
D7
BeitragVerfasst: Di 01.11.05 23:25 
Hey Danke es funktioniert
snoopyonline
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 12.11.05 13:33 
Es gab zwar schon ne funktionierende Antwort aber hier ist noch ne Alternative:

webbrowser1.navigate('htt://www.delphi-forum.de');
while WebBrowser1.ReadyState <> READYSTATE_COMPLETE do application.processmessages;
//und jetzt geht weiter