Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

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!"
            Timer1.Stop()
            Timer2.Start()
        End If
       
    End Sub
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

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