我正在使用TChromium进行授权。
我有变量Chromium1: TChromium;
。我需要在表格隐藏上销毁铬并在表格展示中显示。 (因为铬有时会引发异常“模块libcef.dll中的EExternal异常”并导致我的应用程序崩溃,我认为在没有使用时破坏Chromium会有所帮助)。
我有:
procedure TAuthForm.FormShow(Sender: TObject);
begin
Chromium1 := TChromium.Create(self);
Chromium1.Align := alClient;
Chromium1.OnJsdialog := Chromium1Jsdialog;
Chromium1.OnBeforePopup := Chromium1BeforePopup;
Chromium1.DefaultUrl := 'about:blank';
Chromium1.Parent := Self;
Chromium1.Load(AUTH_URL);
end;
procedure TAuthForm.FormHide(Sender: TObject);
begin
Chromium1.Free;
end;
问题在于,当TAuthForm.FormShow
首先调用时,页面正确加载,但是当我隐藏表单并再次显示浏览器时页面显示不正确,现在不知道如何解释这里是{{1}的示例}:
http://google.com/
它会显示所有块的内容,包括Google(function(){ window.google={kEI:"oKRKUZ2iHafP4QTXwYCwDw",getEI:function(a) {for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI},https:function(){return"https:"==window.location.protocol},kEXPI:"17259,39523,4000116,4001076,4001568,4001948,4001959,4001975,4002562,4002734,4002855,4003178,4003387,4003495,4003917,4004181,4004213,4004257,4004334,4004340,4004479,4004652,4004653,4004697,4004730,4004755,4004759,4004766,4004898,4004905,4004949,4004953,4005154",kCSI:{e:"17259,39523,4000116,4001076,4001568,4001948,4001959,4001975,4002562,4002734,4002855,4003178,4003387,4003495,4003917,4004181,4004213,4004257,4004334,4004340,4004479,4004652,4004653,4004697,4004730,4004755,4004759,4004766,4004898,4004905,4004949,4004953,4005154",ei:"oKRKUZ2iHafP4QTXwYCwDw"},authuser:0,ml:function(){},pageState:"#",kHL:"ru",time:function(){return(new Date).getTime()},log:function(a, b,c,h){var d=new Image,f=google.lc,e=google.li,g="";d.onerror=d.onload=d.onabort=function(){delete f[e]};f[e]=d;!c&&-1==b.search("&ei=")&&(g="&ei="+google.getEI(h));c=c||"/gen_204?........
和<title>
,您可以在此处看到...
我试图找到解决方案,但发现只有相同的错误(我的意思是没有解决方案的libcef.dll异常),这里:评论中的https://stackoverflow.com/questions/13784792/cef3-application-crash-fault-module-kernelbase-dll ...
答案 0 :(得分:0)
Chromium1.Free;是pbm 它破坏你的色情实例,儿子你再也看不到了
只是这样做:
Chromium1.visible:= false; //如果你想隐藏它