[Help]My Web Browser
And sorry, you'll follow the rules, or you'll be appreciating a vacation =P
Oh you will , i assure you that.
Stay on topic.
Stay on topic.
um, to do with a browser, might want to check my post, if i get some help, or get this working, might come in handy.
http://www.mpgh.net/forum/33-visual-...lp-module.html
http://www.mpgh.net/forum/33-visual-...lp-module.html
Well...
Your code to add a webbrowser is not working...You not declared the webbrowser
Your code to add a webbrowser is not working...You not declared the webbrowser
Oh sorry mate, completely missed this post before,
Firstly, it won't dump the text box in a random place if you see here:
[php]
Private Function AddTextBox() As TextBox
TxtBox = New TextBox
With TxtBox
.Name = "Box" & xi
.Location = New Point(25, 25)
End With
Return TxtBox
End Function
[/php]
Location = New Point(25,25)
It will place the new textbox in a location 25px right and down from it's parent controls location, planning ahead
.
Umm a global function would be
[php]
Public Shared Function ......
End Function
[/php]
A Private Function can only be called from it's parent class.
Also I use Functions when I need an output from a given activity. I'll post more details later, I need go study
Firstly, it won't dump the text box in a random place if you see here:
[php]
Private Function AddTextBox() As TextBox
TxtBox = New TextBox
With TxtBox
.Name = "Box" & xi
.Location = New Point(25, 25)
End With
Return TxtBox
End Function
[/php]
Location = New Point(25,25)
It will place the new textbox in a location 25px right and down from it's parent controls location, planning ahead
.Umm a global function would be
[php]
Public Shared Function ......
End Function
[/php]
A Private Function can only be called from it's parent class.
Also I use Functions when I need an output from a given activity. I'll post more details later, I need go study

J-dezzy
can u tell me were to put the codes
my codes are waaay smaller and simpler :O
can u tell me were to put the codes
my codes are waaay smaller and simpler :O
That's what she said?
@ browser
in order to control the back forward and stop etc from each tab use the following
[php]
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).stop()
etc etc etc.
[/php]
Do the same thing for each web browser function.
This will allow you to control the web browser features using the selected tab.
This will allow you to add tabs
[php]
'Below Public Class Form 1
Dim i As Integer = 1
'(or public i as integer = 1)
'In Form Load Event
Dim Browseer As New WebBrowser
TabControl1.TabPages.Add(1, "Page" & i)
TabControl1.SelectTab(1 - 1)
Browser.Name = "Tabbed Browser"
'This will expand the browser to fill the tabcontrol
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
i = i + 1
[/php]
Now go into the button you are using to add a tab and copy and paste the above to allow a tab to be added
Now Go into your remove tab button and add this
[php]
TabControl1.TabPages.RemoveAt(TabControl1.Selected Index)
TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
i = i - 1
[/php]
This will remove a tab from your browser
You can erase my notes obviously.
Hope this helps!
@ browser
in order to control the back forward and stop etc from each tab use the following
[php]
CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).stop()
etc etc etc.
[/php]
Do the same thing for each web browser function.
This will allow you to control the web browser features using the selected tab.
This will allow you to add tabs
[php]
'Below Public Class Form 1
Dim i As Integer = 1
'(or public i as integer = 1)
'In Form Load Event
Dim Browseer As New WebBrowser
TabControl1.TabPages.Add(1, "Page" & i)
TabControl1.SelectTab(1 - 1)
Browser.Name = "Tabbed Browser"
'This will expand the browser to fill the tabcontrol
Browser.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Browser)
i = i + 1
[/php]
Now go into the button you are using to add a tab and copy and paste the above to allow a tab to be added
Now Go into your remove tab button and add this
[php]
TabControl1.TabPages.RemoveAt(TabControl1.Selected Index)
TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
i = i - 1
[/php]
This will remove a tab from your browser
You can erase my notes obviously.
Hope this helps!
This thread is closed for replies.

