So I have this source code in Visual Basic 2010
--------------------------------------------------------------------------------------------------
Public Class Form1
Dim int As Integer = 0
Dim Properties As Object
Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedEventArgs)
End Sub
Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs )
TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle
ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString
End Sub
Private Sub AddTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddTabToolStripMenuItem.Click
Form1_Load:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "Visual Explorer"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub
Private Sub Add(TAB)
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
TabControl1.SelectTab(int)
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub
Private Sub RemoveTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemoveTabToolStripMenuItem.Click
Remove(TAB)
If Not TabControl1.TabPages.Count = 1 Then
TabControl1.TabPages.RemoveAt(TabControl1.Selected Index)
TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
int = int - 1
End If
End Sub
Private Sub Remove(ByVal tabInfo As TabInfo)
Throw New NotImplementedException
End Sub
Private Sub Website(ByVal Properties As Object)
Throw New NotImplementedException
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox1.Text)
End Sub
End Class
My Design looks like this:
When I debug it, I type the website address in and I get a null error. Help!
BTW J_Scap I have Both Firefox and Google Chrome.
Thread: Web Browser Debugging
Results 1 to 15 of 15
-
09-14-2011 05:57 PM

"If you choose not to decide, you still have made a choice"
-
09-15-2011 02:00 PM
I got it working. Just needed to add a tab.
BTW Version 2.01;

"If you choose not to decide, you still have made a choice"
-
09-15-2011 06:38 PM
Cool.

Team Weenieyo
"No one ever got better at hockey by bowling"
-
09-16-2011 04:49 AM
It also has a ve logo and Visual Explorer 2.01 instead of the standard logo and Form 1

"If you choose not to decide, you still have made a choice"
-
10-05-2011 12:11 PM
Where did you learn this?
-
10-05-2011 12:41 PM
Youtube

"If you choose not to decide, you still have made a choice"
-
10-06-2011 12:45 PM
How do you run this program? I've copied the code into a .vb file.
-
10-06-2011 01:08 PM
I actually did all this on my other computer. As soon as I got on that one I'll post about it.
Also, do you have Visual Basic 2010? That may be your issue. If you have it hit the debug button.Last edited by WildCat23; 10-07-2011 at 05:22 AM. Reason: Didn't look at version correctly.

"If you choose not to decide, you still have made a choice"
-
10-06-2011 08:56 PM
-
10-07-2011 06:05 AM
Try reinstalling the program.
Meanwhile, arrange your Form to something like what I have. Also under file is add tab and remove tab. It only needs to have the same number of buttons. Clear all your code and paste this;
Public Class Internet
Dim int As Integer = 1
Dim Properties As Object
Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedEventArgs)
End Sub
Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs )
TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle
ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString
End Sub
Private Sub AddTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddTabToolStripMenuItem.Click
Form1_Load:
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
Browser.Name = "Visual Explorer"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub
Now go to the form and double click file>add tab. Now past this code in the new blank spot;
Private Sub Add(ByVal TAB)
Dim Browser As New WebBrowser
TabControl1.TabPages.Add("New Page")
TabControl1.SelectTab(int)
Browser.Name = "Web Browser"
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
AddHandler Browser.ProgressChanged, AddressOf Loading
AddHandler Browser.DocumentCompleted, AddressOf Done
int = int + 1
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub
Do the same with remove tabb;
Private Sub RemoveTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemoveTabToolStripMenuItem.Click
Remove(TAB)
If Not TabControl1.TabPages.Count = 1 Then
TabControl1.TabPages.RemoveAt(TabControl1.Selected Index)
TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
int = int - 1
End If
End Sub
and <-- (Back button)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack()
End Sub
and --> (foreward0
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward()
End Sub
and refresh/reload
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh()
End Sub
and home
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome()
End Sub
Go button
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox1.Text)
End Sub
search button
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox2.Text)
End Sub
put this at the end
Private Sub Remove(ByVal tabInfo As TabInfo)
Throw New NotImplementedException
End Sub
End Class
"If you choose not to decide, you still have made a choice"
-
10-08-2011 11:40 AM
Decked out for Halloween;

"If you choose not to decide, you still have made a choice"
-
11-04-2011 08:14 PM
Visual Basic Express has installed correctly. What do I do now???
VB 2010 Express Won't let me debug the file.
-
11-05-2011 06:49 AM
Does it ask to see the last successful build?

"If you choose not to decide, you still have made a choice"
-
11-05-2011 09:27 PM
No, the debug button is disabled
-
11-06-2011 04:30 AM
That's weird. I would try contacting Microsoft.

"If you choose not to decide, you still have made a choice"
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Browser Problems w/"Rate This Song Thread"
By jhb8426 in forum Other stuff!Replies: 8Last Post: 07-19-2009, 01:56 PM -
the yo chat is crashing my browser
By Phillip in forum TheYo Board BUGSReplies: 21Last Post: 01-11-2009, 01:58 AM -
Web Browser...
By Yowhatever in forum Other stuff!Replies: 30Last Post: 03-31-2006, 09:02 AM -
just in for psp, a web browser
By biggyo3 in forum Other stuff!Replies: 19Last Post: 07-29-2005, 11:16 PM


LinkBack URL
About LinkBacks








