Link to home
Start Free TrialLog in
Avatar of Replica178
Replica178

asked on

VB.NET Webbrowser and WIN. VISTA

Hi all.I have A problem.
This is Code:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

        If WebBrowser1.Document.Body.OuterText.Contains("Personal Data") Then
            RichTextBox2.Text = RichTextBox2.Text & vbNewLine & "i'm Here!"
            Timer1.Stop()
            Timer2.Start()
        End If
       
    End Sub

Open in new window

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        Try
            WebBrowser1.Navigate(ListBox2.Items.Item(0).ToString)
            RichTextBox2.Text = RichTextBox2.Text & vbNewLine & "Going To: " & ListBox2.Items(0) & "!"
            Timer2.Stop()
            Dim ts As TimeSpan
            Dim targetTime As DateTime = DateTime.Now.AddSeconds(3)
            Do
                ts = targetTime.Subtract(DateTime.Now)
                Application.DoEvents() ' keep app responsive
                System.Threading.Thread.Sleep(50) ' reduce CPU usage
            Loop While ts.TotalSeconds > 0
        Catch ex As Exception
        End Try
        Timer2.Stop()
        If WebBrowser1.ReadyState <> WebBrowserReadyState.Loaded Then
            Timer4.Start()
        End If
    End Sub

Open in new window


It's Working perfectly On Windows 7 x64
But on other OS(Win.XP,WIN.VISTA) it's not working.
What's The problem??
Thank's
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Replica178
Replica178

ASKER

Thanks.The problem was with the internet connection speed.
thanks