WebBrowser1.Navigate(URL); while WebBrowser1.busy do Application.ProcessMessages; while WebBrowser1.ReadyState <> READYSTATE_COMPLETE do Application.ProcessMessages;
while (WebBrowser1.ReadyState <> READYSTATE_COMPLETE) or WebBrowser1.Busy do
Application.ProcessMessages;