webbrowser导航列表框 [英] webbrowser navigate listbox
问题描述
你好伟大的程序员,我需要一个我正在运行的程序的解决方案....
我有一个webbrowser,我希望它导航到我的列表框中的网站列表。
当它导航到网站时,我希望它首先直到一个网站已完全加载,然后导航到列表框中的第二个链接。
我无法做到的代码并且它没有导航到网站而是导航到"http:// m /"。
我希望它在导航到第二个网站之前等待的主要原因是因为我想要 在每个网站上运行一些代码...请...这是我目前的代码:
listbox1.items:   ;   http://yahoomail.com
                               http://google.com
              http://gmail.com
              http://ask.com
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object,ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)处理WebBrowser1.DocumentCompleted
TextBox1.Text = WebBrowser1.Url.ToString
Dim kp As Integer
Dim ik As New Queue(Of String)
对于kp = 0 To ListBox1.Items.Count - 1个
ik.Enqueue(ListBox1.Items(KP)的ToString)
              &NBSP ; Label1.Text = ik.Count
对于每个数作为字符串在IK
                 &NBSP ;  Console.WriteLine(数字)
      Dim ook As Integer
用于OOK = 0〜89 - 52
                     WebBrowser1.Navigate时(编号(OOK))
                &NBSP ;   Me.Label2.Text =(ik.Peek())
              &NBSP ;     Console.WriteLine(ik.Peek)
下一个
下一个
下一个
$
结束子
这是讨论Microsoft Visio的问题和反馈的论坛,你最好将你的问题发布到网站开发者论坛。
Hello Great programmers, please i need a solution to the program that i am running....
I have a webbrowser and i want it to navigate to a list of websites in my listbox.
when it is navigating to the site i want it to first ait till one site has loaded completly before navigating to the second link in the listbox.
the code i have cant do that and it is not navigating to the site instead it is navigating to "http://m/".
the main reason why i want it to wait before navigting to the second site is because i want to run some code on each site... please... this is my code so far below:
listbox1.items : http://yahoomail.com
http://google.com
http://gmail.com
http://ask.com
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompletedTextBox1.Text = WebBrowser1.Url.ToString
Dim kp As Integer
Dim ik As New Queue(Of String)
For kp = 0 To ListBox1.Items.Count - 1
ik.Enqueue(ListBox1.Items(kp).ToString)
Label1.Text = ik.Count
For Each number As String In ik
Console.WriteLine(number)
Dim ook As Integer
For ook = 0 To 89 - 52
WebBrowser1.Navigate(number(ook))
Me.Label2.Text = (ik.Peek())
Console.WriteLine(ik.Peek)
Next
Next
Next
End Sub
Hi,
This is the forum to discuss questions and feedback for Microsoft Visio, you'd better post your questions to web developer forum.
http://social.msdn.microsoft.com/Forums/ie/en-US/home?forum=iewebdevelopment
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support
这篇关于webbrowser导航列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!