|
-
Aug 19th, 2008, 06:50 PM
#1
Thread Starter
New Member
[2008] Progress Bar?
I am trying to code a Web Browser so that when you try to surf the web, a Progress Bar starts up. This is what I tried,
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Bar
WebBrowser1.Navigate(TextBox1.Text)
ProgressBar1.Maximum = 100
ProgressBar1.Step = 1
Bar = ProgressBar1.Value
For x = 0 To 100
ProgressBar1.PerformStep()
Next
If Bar = 100 Then
Bar.Value = 0
End If
End Sub
But it doesn't work. Any suggestions?
-
Aug 19th, 2008, 07:19 PM
#2
Hyperactive Member
Re: [2008] Progress Bar?
Try:
vb Code:
Private Sub Browser_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Me.ToolStripProgressBar1.Maximum = CInt(e.MaximumProgress) Me.ToolStripProgressBar1.Value = CInt(e.CurrentProgress) End Sub
-
Aug 19th, 2008, 07:56 PM
#3
Re: [2008] Progress Bar?
You might like to follow the Tabbed Web Browser link in my signature for some help and ideas.
-
Aug 20th, 2008, 10:34 AM
#4
Thread Starter
New Member
Re: [2008] Progress Bar?
Those didn't really help. Thank you for trying though, I really appreciate it.
-
Aug 20th, 2008, 12:02 PM
#5
Frenzied Member
Re: [2008] Progress Bar?
Which didnt help? What yougbucks said or what jmcilhinney said?
Since i am currently using the code that young bucks supplied...
-
Aug 20th, 2008, 12:05 PM
#6
Thread Starter
New Member
Re: [2008] Progress Bar?
Fixed it. I just added this to my code.
Code:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
ToolStripProgressBar1.Value = 0
Me.Text = WebBrowser1.DocumentTitle
End Sub
-
Aug 20th, 2008, 12:10 PM
#7
Frenzied Member
Re: [2008] Progress Bar?
I dont think you need to set the value back to 0. When i used the code that youngbucks supplied it will set the progressbar back to 0 after the page is complete.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|