1 2 //here is a simple way to copy an html page from the TWebBrowser to your hard3 //drive4 5 procedure TForm1.Button1Click(Sender: TObject);
6 var7 Flags: OLEVariant;
8 begin9 Flags := 0;
10 11 //gets page from www.borland.com12 WebBrowser1.Navigate(WideString('http://www.borland.com'), Flags, Flags, Flags,
13 flags);
14 15 while WebBrowser1.busy do//wait until browser has finished downloading16 application.ProcessMessages;
17 18 //save to memo field19 memo1.text:=WebBrowser1.OleObject.Document.Body.innerHTML;
20 21 //from memo field save to file22 memo1.Lines.savetofile('c:\default.htm');
23 end;