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.
However when I do my own app with the component, I can't load my own url. I get a access violation.
Chromium2.Browser.MainFrame.LoadUrl('http://www.example.com');
The TChromium component is working and I have all the DLLs in the right place, since if I set DefaultUrl
it works fine.
I have Chromium2 in a TPageControl page and with the OnClick event of a button I call the above code. I get an AccessViolation. Mainframe is nil
.
I can't find a way around this, has anyone got this to work?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…