Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,064 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,776 people online right now. Registration is fast and FREE... Join Now!




progressbar link to webbrowser component

 
Reply to this topicStart new topic

progressbar link to webbrowser component

unlimited
16 Feb, 2008 - 02:40 PM
Post #1

New D.I.C Head
*

Joined: 16 Apr, 2007
Posts: 27


My Contributions
Hey. I have some code for a ProgressBar that i'm trying to link to the webbrowser component in VB 2005 XE. the code so far
CODE
If ProgressBar1.Value <> ProgressBar1.Maximum Then
            ProgressBar1.Value = (ProgressBar1.Value + 1)
. the next line should look sompthing like this
CODE
= "Loading" & ProgressBar1.Value & "% Complete"
. before the "=" there should be a statement or sompthing eg (this code was copied from someone else)
CODE
Label2.Text = "Loading " & ProgressBar1.Value & "% Complete"
and it works for his/her purpose but I need to modify it to work for the webbrowser component.

You're help will be appreciated biggrin.gif
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Progressbar Link To Webbrowser Component
16 Feb, 2008 - 02:48 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Moved to VB.Net Forum smile.gif
User is offlineProfile CardPM
+Quote Post

unlimited
RE: Progressbar Link To Webbrowser Component
16 Feb, 2008 - 03:00 PM
Post #3

New D.I.C Head
*

Joined: 16 Apr, 2007
Posts: 27


My Contributions
QUOTE(PsychoCoder @ 16 Feb, 2008 - 03:48 PM) *

Moved to VB.Net Forum smile.gif


oh sorry for posting in the wrong place. biggrin.gif
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Progressbar Link To Webbrowser Component
16 Feb, 2008 - 03:18 PM
Post #4

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
No problem, you'll get a better response in this forum smile.gif

PS: I replied to your first topic, and moved it as well
User is offlineProfile CardPM
+Quote Post

unlimited
RE: Progressbar Link To Webbrowser Component
17 Feb, 2008 - 10:04 AM
Post #5

New D.I.C Head
*

Joined: 16 Apr, 2007
Posts: 27


My Contributions
QUOTE(PsychoCoder @ 16 Feb, 2008 - 04:18 PM) *

No problem, you'll get a better response in this forum smile.gif

PS: I replied to your first topic, and moved it as well


oh thanks for the reply for the first post; you have been very helpful xD.
User is offlineProfile CardPM
+Quote Post

Sothrie
RE: Progressbar Link To Webbrowser Component
19 Feb, 2008 - 05:58 AM
Post #6

New D.I.C Head
*

Joined: 3 Dec, 2007
Posts: 25


My Contributions
Hi. I'm not entirely sure what you're having problems with, but I'm gonna try to help anyway. tongue.gif

The WebBrowser component has a few useful events that you should look at: namely ProgressChanged and DocumentCompleted. This Guy had some code with ProgressChanged where he set a progressbar value that might work for you. You might take a look at that.

If you are still confused, feel free to ask more!

Hope this helps!
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Progressbar Link To Webbrowser Component
19 Feb, 2008 - 10:35 AM
Post #7

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
As Sothrie indicated, you will use the ProgressChanged event to update the ProgressBar. It actually takes very little code to accomplish this.

Here is an example:
CODE

    Private Sub WebBrowser1_ProgressChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs) Handles WebBrowser1.ProgressChanged
        Me.ProgressBar1.Maximum = Convert.ToInt32(e.MaximumProgress)
        Me.ProgressBar1.Value = Convert.ToInt32(e.CurrentProgress)
    End Sub

User is offlineProfile CardPM
+Quote Post

unlimited
RE: Progressbar Link To Webbrowser Component
25 Feb, 2008 - 08:04 AM
Post #8

New D.I.C Head
*

Joined: 16 Apr, 2007
Posts: 27


My Contributions
wow thanks both of you for the replies... I will try them soon... just got my project deleted by mistake by my dad sad.gif, but gonna re-code it biggrin.gif.

thanks for you're help xD
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 10:47PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month