I am interested in the following:

  1. How do I know that the page has loaded completely?
  2. I know that the picture I webBrowser1.OleObject.Document.Images.item(i) is stored in webBrowser1.OleObject.Document.Images.item(i) . How can I insert it into Image.Picture regardless of the image extension?

    2 answers 2

    1. Event WebBrowser1DocumentComplete comes
    2. Save it to a file and load it into Image already from the file.

    And in order not to be dependent on the file extension, add in USES jpeg (for jpg) Acpng (for png).

    • how to save to file? I will be very grateful for a piece of code (: - Antiless
     var body, imgs, controlRange: olevariant; body := WebBrowser1.OleObject.document.body; imgs := WebBrowser1.OleObject.document.images.item(i);//нужный img controlRange := body.createControlRange; controlRange.add(imgs); controlRange.execCommand('Copy', False, EmptyParam);//копируем Image1.Picture.Bitmap.LoadFromClipboardFormat(cf_Bitmap, ClipBoard.GetAsHandle(cf_Bitmap), 0); {!!!самое главное, без чего не работало, добавить в конце всей программы} initialization OleInitialize(nil); finalization OleUninitialize; 
    • The editor has a button "101010" for highlighting the code - Sh4dow