well ive made by brwoser
its got all the average things
its got a type and search section
its got a Go Foward and back and refresh and stop
i want to know (with the tab tool) how to make it so when i click the button for a new tab
it creates a new tab
also how to make a custom homepage
thanks
i cna upload the project if needed
Okay dokes.
To add a new tab, just add this code on a button or whatever.
TabControl1.TabPages.Add("Whatever text you want here for the tab. ")
no i mean also when you create a new tab
you can type in the textbox it only works for the current tab only
Uhm let me try that..
Uhm... not sure on this one.. i can't remember i did this before..
thanks
but what you said worked
so thanks for that
lol no problems.
The deeper problems i'll let J-Deezy solve, i'm not 100% on it..
Uhh if you want a new textbox for each tab you'll have to add controls and shit, I'll give you some brief examples of it.
This is a very simple example of creating a new page and a new textbox in each page.
Declare globally:
[php]
Dim Tab As TabPage
Dim TxtBox As TextBox
Dim xi As Integer = 0
[/php]
Okay now
[php]
Private Sub AddTab(ByVal tControl As TabControl)
Tab = New TabPage
With Tab
.Name = "NewTab" & xi
.Text = "Whatever"
End With
TxtBox = New TextBox
With TxtBox
.Name = "Box" & xi
.Location = New Point(25, 25)
End With
Return TxtBox
End Function
[/php]
Basically creates a dynamic tabpage with a textbox at the set location in the control. To use it, simply specify the tabcontrol to add the page to, i.e
[php]
AddTab(Me.TabControl1)
[/php]
Questions? Just ask.
EDIT
Hmm I was just thinking that's probably not exactly what you were asking as the textbox is generally separate from the tabs, change it up with a fully docked Webbrowser instead i.e
Globals:
[php]
Dim Tab As TabPage
Dim wBrowse As WebBrowser
Dim xi As Integer = 0
[/php]
[php]
Private Sub AddTab(ByVal tControl As TabControl)
Tab = New TabPage
With Tab
.Name = "NewTab" & xi
.Text = "Whatever"
End With
wBrowse = New WebBrowser
With wBrowse
.Name = "Browser" & xi
.Dock = DockStyle.Fill
.Navigate("HOMEPAGE HERE")
End With
Return wBrowse
End Function
[/php]
And then when someone presses navigate, to tell which browser should do the navigating try this:
[php]
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim DoBrowse As WebBrowser = GetBrowser()
DoBrowse.Navigate("http://www.mpgh.net")
End Sub
Private Function GetBrowser() As WebBrowser
Dim browser As WebBrowser
For Each c As Control In TabControl1.SelectedTab.Controls
If c.Name.StartsWith("Browser") Then
browser = c
End If
Next
Return browser
End Function
[/php]
In my case Button4 was the browse button.
Pretty messy but it works.
Nice one..
The problem with that though is that it dumps the textbox in a random place..
I guess you could be proactive and create millions of tabs that aren't visible built with textboxes until you click a button =D
Ooh and i've got a question -raises hand-
Functions?
I've read and heard of them, but i don't know the full explanation.
Is it like a global function where you can call it anywhere?
f
Uh..
What?
i did that on his topic and he is mad XD
Originally Posted by J-Deezy
Uhh if you want a new textbox for each tab you'll have to add controls and shit, I'll give you some brief examples of it.
This is a very simple example of creating a new page and a new textbox in each page.
Declare globally:
[php]
Dim Tab As TabPage
Dim TxtBox As TextBox
Dim xi As Integer = 0
[/php]
Okay now
[php]
Private Sub AddTab(ByVal tControl As TabControl)
Tab = New TabPage
With Tab
.Name = "NewTab" & xi
.Text = "Whatever"
End With
TxtBox = New TextBox
With TxtBox
.Name = "Box" & xi
.Location = New Point(25, 25)
End With
Return TxtBox
End Function
[/php]
Basically creates a dynamic tabpage with a textbox at the set location in the control. To use it, simply specify the tabcontrol to add the page to, i.e
[php]
AddTab(Me.TabControl1)
[/php]
Questions? Just ask.
sorry but were do i put then
your to advanced for me :O
Okay, so put the declarations (at the top) under Public Class, or pretty much any blank space that isn't in a Sub/Function/Event/whatever.
Same thing With the next Sub and Function.
Then on the last bit of code.
Put that where you want to add the new tab.
Yeah exactly, just returning what you did to my thread.
No hard feelings
Guys, stay on topic.
Or i'll get Nextgen to ban yooh for trolling/trashing threads =P.
Its a valid reason, just because someone trashed your thread doesnt give you the reason to do it back.
Report it to a mod/staff.
Don't take your own actions that you deem appropriate.
I editted my above post, go look. It was bad before but i fixed it up.