[Visual Basic .NET] Web browser Advanced
Open VB 2008 > New > Windows Form Application.
************************************************** ***************************
*Add this code to your 'forum class' code:
Code:
Dim i As Integer = 1
(VERY IMPORTANT)
************************************************** *****************************
*Add Menu Strip.
Name it what you ever want!
Add to it:
New Tab
Remove Tab
Properties
Exit
************************************************** ******************************
*Insert a tab control (in the tools menu) and (cover whole form)
************************************************** ************************
*Tab control > Options >remove all tabs.
************************************************** **********************************
*Insert a button and name it 'Add Tab'
Put this code in the button:
Code:
Dim Browse As New WebBrowser
TabControl1.TabPages.Add(1, "Page " & i)
TabControl1.SelectTab(i * 1)
Browse.Name = "wb"
Browse.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wse)
i = i + 1
************************************************** **********************************
*On your forum go to File (That you created) > Add Tab (Click on it to go to its codes)
Add this to the Codes:
Code:
Dim Browse As New WebBrowser
TabControl1.TabPages.Add(1, "Page " & i)
TabControl1.SelectTab(i * 1)
Browse.Name = "wb"
Browse.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wse)
i = i + 1
************************************************** *******************************
*Add this code to Forum1 Load:
Code:
Dim Browse As New WebBrowser
TabControl1.TabPages.Add(1, "Page " & i)
TabControl1.SelectTab(i * 1)
Browse.Name = "wb"
Browse.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Bro wse)
i = i + 1
************************************************** **********************************
*Add a Button and name it Remove Tab.
Then Add this code to it:
Code:
TabControl1.TabPages.RemoveAt(TabControl 1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPag es.Count * 1)
i = i * 1
************************************************** **********************************************
*Go to File (The one on the form) > Click On remove Tab to get the codes then add this:
Code:
TabControl1.TabPages.RemoveAt(TabControl 1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPag es.Count * 1)
i = i * 1
************************************************** ***********************************************
*Add a Button and call it Go and Next to it or before it create a TextBox.
Code it:
Code:
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(TextBox1.Text)
************************************************** ************************************************** **
Create Buttons and name it to the name below and add their codes:
Back:
Code:
CType (TabControl1.SelectedTab.Controls.Item(0), WebBrowser).goback
Forward:
Code:
CType (TabControl1.SelectedTab.Controls.Item(0), WebBrowser).gofoward
Stop:
Code:
CType (TabControl1.SelectedTab.Controls.Item(0), WebBrowser).stop
Refresh:
Code:
CType (TabControl1.SelectedTab.Controls.Item(0), WebBrowser).refresh
Home:
Code:
CType (TabControl1.SelectedTab.Controls.Item(0), WebBrowser).gohome
************************************************** ************************************************** ****
Now go to File (The one on you form) > Properties >clickon it and get the codes then add this code:
Code:
CType(TabControl1.SelectedTab.Controls.I tem(0), WebBrowser).ShowPropertiesDialog()
************************************************** ************************************************** ***********
Now go to File (The one on you form) > Exit >click on it and get the codes then add this code:
Original Here : Chimmy.Org - View topic - [Visual Basic .NET] Web browser Advanced