Сохранить страницу в WebBrowser на диск

Советы » Браузер » Сохранить страницу в WebBrowser на диск

uses

ActiveX, MSHTML_TLB, SHDocVw_TLB, ComCtrls, OleCtrls; procedure

TForm1.Button1Click(Sender: TObject); var

HTMLDocument: IHTMLDocument2; PersistFile: IPersistFile; begin

HTMLDocument := WebBrowser1.Document as

IHTMLDocument2; PersistFile := HTMLDocument as

IPersistFile; PersistFile.Save(StringToOleStr('c:SavedFile.html'), System.True

); end

;

Другое по теме:

Категории

Статьи

Советы

Copyright © 2023 - All Rights Reserved - www.delphirus.com