问题
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