L
lyboy99
Unregistered / Unconfirmed
GUEST, unregistred user!
用webbrowser控件写了个多页浏览器,可是当浏览的网页中有<script language=javascript>window.close(this)</script> 关闭语句时候webbrowser就被Free了,接着出现Could not obtain OLE control window handle 错误。‘
而"javascript:window.close()"关闭窗口,我已经解决了procedure
TForm1.ApplicationEvents1Message(var Msg: tagMSG;var Handled: Boolean);
begin
if (Msg.message=WM_COLSE) and (Msg.hwnd = wb.Handle) then
begin
closewebclick(Self);
end;
就可以解决了,可是如果是javascript:window.close(this) 语句如何解决呢?
而"javascript:window.close()"关闭窗口,我已经解决了procedure
TForm1.ApplicationEvents1Message(var Msg: tagMSG;var Handled: Boolean);
begin
if (Msg.message=WM_COLSE) and (Msg.hwnd = wb.Handle) then
begin
closewebclick(Self);
end;
就可以解决了,可是如果是javascript:window.close(this) 语句如何解决呢?