Error on LoadURL with TChromium

前端 未结 5 1995
抹茶落季
抹茶落季 2020-12-10 19:13

I found the brilliant Delphi Chromium project for embedding Chrome in a Delphi form. It works well in Delphi7 after a bit of hacking and I can get the demo app running.

5条回答
  •  温柔的废话
    2020-12-10 19:49

    The problem is that mainframe only loads after the page has loaded.

    For one thing, you need to do:

    if Assigned(Chromium2.Browser.MainFrame)
        then  Chromium2.Browser.MainFrame...
    

    However, that is not the preferred way to navigate, but instead you should do:

    Chromium1.Load( theUrl );
    

    If you still want to use MainFrame, do it in OnLoadEnd event.

提交回复
热议问题