Delphi TWebBrowser freezes GUI on Windows Startup

我怕爱的太早我们不能终老 提交于 2019-12-08 03:54:23

问题


I wrote a software and added it to windows startup. When app starts, it navigates a webpage. However, TWebbrowser freezes GUI until it is prepared to run. During this time, i can not do anything because gui is frozen. Does anyone have any solution to this?

I know it is just Internet Explorer ActiveX and IE also freezing if i add it to startup. This doesn't happen if i run it second time. Only happens on Windows startup.

I have XE5 here and my IE is 11. But in my office i have tested it in IE8 and IE9.

procedure TfrmUsers.CallWeb(szUrl: string);
var
  Flags: OLEVariant;
begin
  try
    Flags := navNoHistory or navNoReadFromCache or navNoWriteToCache;
    WebBrowser1.Navigate(szUrl, Flags);
  except
  end;
end;

procedure TfrmUsers.FormShow(Sender: TObject);
begin
  CallWeb(APP_WEB);
end;

-K

来源:https://stackoverflow.com/questions/21075565/delphi-twebbrowser-freezes-gui-on-windows-startup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!