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
SecurityVisual Basic.NET

Avatar of undefined
Last Comment
Replica178
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Replica178
Replica178

ASKER

Thanks.The problem was with the internet connection speed.
Avatar of Replica178
Replica178

ASKER

thanks
Visual Basic.NET
Visual Basic.NET

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,

96K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo