troubleshooting Question

VB.NET Webbrowser and WIN. VISTA

Avatar of Replica178
Replica178 asked on
SecurityVisual Basic.NET
3 Comments1 Solution387 ViewsLast Modified:
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!"
        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
            RichTextBox2.Text = RichTextBox2.Text & vbNewLine & "Going To: " & ListBox2.Items(0) & "!"
            Dim ts As TimeSpan
            Dim targetTime As DateTime = DateTime.Now.AddSeconds(3)
                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
        If WebBrowser1.ReadyState <> WebBrowserReadyState.Loaded Then
        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??
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros