I have a modGlobal section that has web pages urls in it.
Module modGlobals
Public webpage1 As String = " Public webpage2 As String = " Public webpage3 As String = " Public webpage4 As String = "End Module
I want to display these pages in WebBrowser1, rotating through them every 10 seconds until I click a button that puts the text "Stop" in a textbox1 (best way I could figure to let the client stop it). So I have this:
Dim pages As Integer
Do Until TextBox1.Text = "Stop"
For pages = 1 To 4
Dim newpage As String
Dim pagenumber As String = Convert.ToString(pages)
newpage = "webpage" + pagenumber
Me.WebBrowser1.Url = New System.Uri(newpage)
Dim sw As New Stopwatch()
sw.Start()
Do Until sw.Elapsed.Seconds = 10
Application.DoEvents()
Loop
sw.Stop()
Next pages
Loop
I keep getting this error "Invalid URI: The format of the URI could not be determined" and I can't figure it out. I know that its putting in the text "webpage1", "webpage2", etc.. and not referencing the url. I just can't figure out how to get the url in.
TIA
Module modGlobals
Public webpage1 As String = " Public webpage2 As String = " Public webpage3 As String = " Public webpage4 As String = "End Module
I want to display these pages in WebBrowser1, rotating through them every 10 seconds until I click a button that puts the text "Stop" in a textbox1 (best way I could figure to let the client stop it). So I have this:
Dim pages As Integer
Do Until TextBox1.Text = "Stop"
For pages = 1 To 4
Dim newpage As String
Dim pagenumber As String = Convert.ToString(pages)
newpage = "webpage" + pagenumber
Me.WebBrowser1.Url = New System.Uri(newpage)
Dim sw As New Stopwatch()
sw.Start()
Do Until sw.Elapsed.Seconds = 10
Application.DoEvents()
Loop
sw.Stop()
Next pages
Loop
I keep getting this error "Invalid URI: The format of the URI could not be determined" and I can't figure it out. I know that its putting in the text "webpage1", "webpage2", etc.. and not referencing the url. I just can't figure out how to get the url in.
TIA