G
G
grinchi52017-11-13 09:11:23
Delphi
grinchi5, 2017-11-13 09:11:23

How to restart TChromium?

the component starts like this, everything works

program SimpleBrowser;
///////////////////////////////////////
begin
  GlobalCEFApp := TCefApplication.Create;
  GlobalCEFApp.cache                := 'cef\cache';
  GlobalCEFApp.cookies              := 'cef\cookies';
  GlobalCEFApp.UserDataPath         := 'cef\User Data';
}
////////////////////////////////////////////////////////
  if GlobalCEFApp.StartMainProcess then
    begin
      Application.Initialize;
      {$IFDEF DELPHI11_UP}
      Application.MainFormOnTaskbar := True;
      {$ENDIF}
      Application.CreateForm(TForm1, Form1);
      Application.Run;
    end;
  GlobalCEFApp.Free;
end.

how can i restart it? to change the cache folder.
the following code does not throw any errors, but creates a copy of the form, and nothing works on it
procedure TForm1.Button1Click(Sender: TObject);
begin
  GlobalCEFApp.Free;
  GlobalCEFApp := TCefApplication.Create;
  GlobalCEFApp.cache                := 'cef\cache';
  GlobalCEFApp.cookies              := 'cef\cookies';
  GlobalCEFApp.UserDataPath         := 'cef\User Data';
  GlobalCEFApp.StartMainProcess 
end;

https://github.com/salvadordf/CEF4Delphi/tree/mast...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-11-13
@grinchi5

Ask on the forum https://www.briskbard.com/forum/viewforum.php?f=8&...
The developer always helps everyone there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question