MainForm popsup again after closing
Posted: Sat Dec 21, 2019 6:02 pm
Hi,
I've added TChromium to my application. Studied the examples and information on your website. Also adjusted my application dpr file as explained in the examples and on the website. It works very nice but the only issue I'm having is when my application is closed. After closing it pops up again and then after a few second it closes definitely.
Debugged it and it pops up again when it hits cef_shutdown. After this step continues (a few seconds) the application closes definitely. Quite annoying so I must be doing something wrong. Any idea?
Regards,
Pascal
I've added TChromium to my application. Studied the examples and information on your website. Also adjusted my application dpr file as explained in the examples and on the website. It works very nice but the only issue I'm having is when my application is closed. After closing it pops up again and then after a few second it closes definitely.
Debugged it and it pops up again when it hits cef_shutdown. After this step continues (a few seconds) the application closes definitely. Quite annoying so I must be doing something wrong. Any idea?
Regards,
Pascal
Code: Select all
procedure TCefApplicationCore.ShutDown;
begin
try
if (FStatus = asInitialized) then
begin
FStatus := asShuttingDown;
cef_shutdown();
end;
except
on e : exception do
if CustomExceptionHandler('TCefApplicationCore.ShutDown', e) then raise;
end;
end;
Code: Select all
program Project1;
uses
Vcl.Forms,
WinApi.Windows,
uCEFApplication,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
begin
GlobalCEFApp := TCefApplication.Create;
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;
GlobalCEFApp.Free;
end.