0

hey all,

I have this code in VB.NET :

Having:
1 TextBox
1 Button

with this code:

Public Class Form1
Dim m As String()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
m = TextBox1.Text.Split(Environment.NewLine)
For Each k As String In m
'MessageBox.Show(k)
WebBrowser1.Navigate(k)
Next

End Sub

input
www.a.com
www.b.com
www.c.com
www.google.com

it navigates only to the last website (www.google.com)
i think that's because the for loop is faster that navigation process

is there any suggestion ?

maybe using threads or sleep helps! but i need someone to help me combining all together.

thanks a lot.

Edited by eawedat: fix

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Oxiegen
0

Yeah. Threading may just be the way to go.
But I have to ask.
I'm guessing the purpose is to enter an URL and have the webbrowser control go there.
But if you iterate through a bunch of sites on the SAME webbrowser control, no one will ever have time to do anything on any of them except the last one.
So my question is this, what's the point?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.