Hello
I really need help! I have a tabbed web browser and i can't figure out how to use a progress bar with it!
Thanks,
GeekBoy124
Printable View
Hello
I really need help! I have a tabbed web browser and i can't figure out how to use a progress bar with it!
Thanks,
GeekBoy124
Handle the ProgressChanged event of the WebBrowser. Have a look at the members of the e eventargs object. There are two properties in there that you should assign to two very similar properties on your ProgressBar, I believe its pretty easy to see which ;)
Search for a ProgressChanged event, handle it and increment the Value property of the progress bar accordingly.
no you don't understand! It's tabbed!!! It doesn't work the same as a regular web browser!
Of course it does. There's just a bit more to it, getting the right information for the right tab. You still get the information in the same way. Follow the link in my signature to see how I implemented it.Quote:
Originally Posted by geekboy124
I've seen that post and (no offence but) it doesn't help much. I use a different kind of tabbing method than you do. Here's my tab code:
EDIT:Code:Private Sub NewTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewTabToolStripMenuItem.Click
Dim wbrowse As New WebBrowserPrintCtrl.WebBrowserPrintCtrl.WebBrowserPrintCtrl
TabControl1.TabPages.Add(i, "Page " & i)
TabControl1.SelectTab(i - 1)
wbrowse.Name = "WebBrowserPrintCtrl1"
wbrowse.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(wbrowse)
i = i + 1
End Sub
Also your code gives error messages
Hey,
Regardless of the type of tabbing that you are using, the process is that same as what as been described here. You need to handle the ProcessChanged event of the webbrowser.
Assuming you are wanting a progressbar for the currently selected tab, then you need to handle the ProcessChanged event of the webbroswer contained within that tab. When you add a new tab, also add a reference to a event that will handle the ProcessChanged event, and put any code that you want to carry out in that event.
Also, what "error" messages exactly are you getting in jm's post? I have personally downloaded, built and run the code that he has posted, and it has worked perfectly!
Gary
A different type of tab code? You have a TabControl with TabPages, each with a WebBrowser control on it. So do I. The differences are minor. If you can't adapt my code to work for you then you haven't tried very hard.
Also, as Gary says, telling us you get errors without telling us what and where is completely pointless.