• 0

[VB.NET] I need help with a Progress Bar


Question

:D Hey,

I am making a browser, but I got this problem. I got a Progress Bar and a Performance Counter but how do I put them together??

Thanks :D

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

You don't. They're not related at all. The PerformanceCounter class monitors system information like processor time, network transfer (total network transfer) and free memory. None of that really has anything to do with a progress bar in a web browser.

Link to comment
Share on other sites

  • 0

Here's what I'm using for my Browser in VB.NET Express. Feel free to copy and paste.

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

'Resets ProgressBar to empty state up Web Page completion

With ToolStripProgressBar1

.Value = 0

End With

End Sub

Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating

'Advances ProgressBar along with Web Page Progress

With ToolStripProgressBar1

.Minimum = 0

.Maximum = 50

.Step = 5

End With

For index As Integer = 0 To 50 Step 5

ToolStripProgressBar1.Value = index

System.Threading.Thread.Sleep(35)

ToolStripProgressBar1.ResetComponentSettings()

Next

End Sub

It seems to be working, but if any of the gurus here have any corrections, I would be most appreciative. Besides, I've only been using VB.NET Express for about 2 weeks with ZERO programming experience and I think it shows. I got all of that from the MSDN Library that should be installed with VB.NET Express.

Just my 2 sense.......

Link to comment
Share on other sites

  • 0
Here's what I'm using for my Browser in VB.NET Express. Feel free to copy and paste.

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

'Resets ProgressBar to empty state up Web Page completion

With ToolStripProgressBar1

.Value = 0

End With

End Sub

Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating

'Advances ProgressBar along with Web Page Progress

With ToolStripProgressBar1

.Minimum = 0

.Maximum = 50

.Step = 5

End With

For index As Integer = 0 To 50 Step 5

ToolStripProgressBar1.Value = index

System.Threading.Thread.Sleep(35)

ToolStripProgressBar1.ResetComponentSettings()

Next

End Sub

It seems to be working, but if any of the gurus here have any corrections, I would be most appreciative. Besides, I've only been using VB.NET Express for about 2 weeks with ZERO programming experience and I think it shows. I got all of that from the MSDN Library that should be installed with VB.NET Express.

Just my 2 sense.......

Thanks, thats what I wanted, thanks again.... :D

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.