Use Tchromium to make a browser

Asked

Viewed 2,445 times

1

I want to use the Tchromium to make a browser with Delphi. But I’m not getting access to any page with it.
I’ve used the controls:

Chromium1.Load('www.terra.com.br');

Also:

Chromium1.Browser.MainFrame.LoadUrl('www.terra.com.br');

And it won’t!!

Does anyone know how to use this component?

  • I realized that when the site opens in protocol https the problem occurs. In the protocol http, the sites open normally. It’s even funny, because the Bing I can open it, but the Google does not open because it is https

  • You can use the new Microsoft webview2 ( Edge )

1 answer

2


Set the property DefaultURL with the path you want to open with home page.

Already for loading other pages use:

Of Chromium1.Browser.MainFrame.LoadUrl('www.google.com);

To Chromium1.Browser.MainFrame.LoadUrl('https://www.google.com/);

That is, you have to use the absolute path for it to carry!

Obs: The Method LoadString serves for you to set a Fixed home page you created (your own html).

I used the Delphi Chromium Embedded 3 to mount that answer.

  • A doubt: If the browser only works if there is absolute path, complicates... because the user will not type the absolute path. I say this in case of using the browser as if it were a browser. And I tested as you posted, but it still hasn’t worked

  • 1

    Here’s the thing, every browser when starting navigation tests https (if not added), in a negative result it browses http. About you testing and not working what I posted, make sure you copied the correct Dll’s to use the Delphi Chromium Embedded 3 browser

Browser other questions tagged

You are not signed in. Login or sign up in order to post.