Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
How to create and destroy browser form?
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to create and destroy browser form?
It's been a long time since the last time I took a look at the source code of the DCEF3 project.
It should be possible but you will have to "translate" what you see in the ToolboxBrowser demo.
As you can see, the CEF initialization and finalization steps are different.
It should be possible but you will have to "translate" what you see in the ToolboxBrowser demo.
As you can see, the CEF initialization and finalization steps are different.
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
Thanks for the link
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
I have installed old cef 4 version, but my project could not compiled.
[dcc32 Error] Unit1.pas(348): E2010 Incompatible types: 'uCEFTypes.TCefMouseButtonType' and 'ceflib.TCefMouseButtonType'
Code: Select all
Chromium1.Browser.Host.SendMouseClickEvent(@MouseCoord, MBT_LEFT, false, 1);
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to create and destroy browser form?
The DCEF3, CEF4Delphi and OldCEF4Delphi projects share many class names, data type names, event names, etc.
If you work with one of them then you will have to uninstall the rest and remove the other projects from the library path.
The error you have is caused by this and you will have to uninstall DCEF3 before you install OldCEF4Delphi.
If you work with one of them then you will have to uninstall the rest and remove the other projects from the library path.
The error you have is caused by this and you will have to uninstall DCEF3 before you install OldCEF4Delphi.
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
ok, i did it. I have uninstalled both and installed CEF4 OLD.
But there are new problems. It is really hard to remake project written on cef3 to cef4. No ceflib here and problems begins with string
because no iCefCookieManager in this version.
Maybe anybody knows how to create and destroy form containing Chromium in cef3.
But there are new problems. It is really hard to remake project written on cef3 to cef4. No ceflib here and problems begins with string
Code: Select all
var CookieManager: iCefCookieManager;
Maybe anybody knows how to create and destroy form containing Chromium in cef3.
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
Anybody please help me
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to create and destroy browser form?
The CookieVisitor demo in OldCEF4Delphi has all the code to get and set the cookies.
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
CEF3 also creates global application which I can not terminate after closing form.
Everything is ok and no need to rewrite project using CEF 4, but I only need analog of GlobalCEFApp.Free for CEF3.
Everything is ok and no need to rewrite project using CEF 4, but I only need analog of GlobalCEFApp.Free for CEF3.
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
I have found function CEFShutDown. Hope it will help.
Code: Select all
// This function should be called on the main application thread to shut down
// the CEF browser process before the application exits.
cef_shutdown: procedure(); {$IFDEF CPUX64}stdcall{$ELSE}cdecl{$ENDIF};
-
- Posts: 112
- Joined: Wed Jul 01, 2020 10:22 am
Re: How to create and destroy browser form?
I am trying to do this
but nothing happened: the process is still in the task manager after closing main form
Code: Select all
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
CefShutdown();
end;