sabato 19 febbraio 2011

ReadyState vb.net infinito

La mia soluzione:

Dim dt As Date = Date.Now

Do
Application.DoEvents()
If DateDiff(DateInterval.Second, dt, Date.Now) > 30 Then
GoTo labe
End If

Loop Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete


il 30 indica che se resta "bloccato" nel loop infinito dopo 30 secondi esce con il vecchio goto (ormai andato in disuso).