473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

tabpage(s) with webbrowser

I have a tab control in a which a few of the tabs include an AxWebBrowser browser control. Let say i have currently tabpage2 and i typed url in combobox when i pressed enter it doesn't display webbrowser instead i can do create new tab. ne one knows how to display currrently displayed regardless of tabpage(s)?
here is code:
Public Sub AddBrowserTab()
AxWebBrowser1.Visible = False
Dim newPage As TabPage = New TabPage(Text) ' Delcare and create the tab page
Dim browser As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser ' Declare and create the browser(control)
newPage = New TabPage(Text)
browser = New AxSHDocVw.AxWebBrowser
newPage.Controls.Add(browser) ' Add the browser to the tab(page)
browser.Dock = DockStyle.Fill ' Fill the tab page withit.
browser.Enabled = True ' Enable it

TabControl1.TabPages.Add(newPage) ' Add the tab page to the tab control
TabControl1.Visible = True

browser.Navigate2(cboAddress.Text)
browser.Silent = False
newPage.ToolTipText = Text

Debug.WriteLine("NP :" & newPage.TabIndex)
Debug.WriteLine("Name :" & newPage.Text.ToString())
' browser.Navigate2("about:blank") ' Set initial page to blank()
cboAddress.Text = String.Empty
End Sub

Nov 21 '05 #1
4 3464
Supra,

I made a form with a tabcontrol with two tabpages on it.
Dragged to both a button
Dragged to both a axwebbrowser

It works exactly as I expected.

Until now I never saw somebody in this newsgroups who succeeded to use the
axwebbrowser without draging it on a form (not that I say that it is
impossible however it will be probably a lot of work and dragging does all
the settings in the RESX)

I hope this helps?

Cor
"Supra" <su*****@rogers.com>
I have a tab control in a which a few of the tabs include an AxWebBrowser
browser control. Let say i have currently tabpage2 and i typed url in
combobox when i pressed enter it doesn't display webbrowser instead i can
do create new tab. ne one knows how to display currrently displayed
regardless of tabpage(s)?
here is code:
Public Sub AddBrowserTab()
AxWebBrowser1.Visible = False
Dim newPage As TabPage = New TabPage(Text) ' Delcare and create
the tab page
Dim browser As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser
' Declare and create the browser(control)
newPage = New TabPage(Text)
browser = New AxSHDocVw.AxWebBrowser
newPage.Controls.Add(browser) ' Add the browser to the
tab(page)
browser.Dock = DockStyle.Fill ' Fill the tab page
withit.
browser.Enabled = True ' Enable it

TabControl1.TabPages.Add(newPage) ' Add the tab page to the
tab control
TabControl1.Visible = True

browser.Navigate2(cboAddress.Text)
browser.Silent = False
newPage.ToolTipText = Text
Debug.WriteLine("NP :" & newPage.TabIndex)
Debug.WriteLine("Name :" & newPage.Text.ToString())
' browser.Navigate2("about:blank") ' Set initial page to
blank()
cboAddress.Text = String.Empty
End Sub

Nov 21 '05 #2
do u have code to send me so i can take a look at it and see how it works?
Cor Ligthert wrote:
Supra,

I made a form with a tabcontrol with two tabpages on it.
Dragged to both a button
Dragged to both a axwebbrowser

It works exactly as I expected.

Until now I never saw somebody in this newsgroups who succeeded to use the
axwebbrowser without draging it on a form (not that I say that it is
impossible however it will be probably a lot of work and dragging does all
the settings in the RESX)

I hope this helps?

Cor
"Supra" <su*****@rogers.com>
I have a tab control in a which a few of the tabs include an AxWebBrowser
browser control. Let say i have currently tabpage2 and i typed url in
combobox when i pressed enter it doesn't display webbrowser instead i can
do create new tab. ne one knows how to display currrently displayed
regardless of tabpage(s)?
here is code:
Public Sub AddBrowserTab()
AxWebBrowser1.Visible = False
Dim newPage As TabPage = New TabPage(Text) ' Delcare and create
the tab page
Dim browser As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser
' Declare and create the browser(control)
newPage = New TabPage(Text)
browser = New AxSHDocVw.AxWebBrowser
newPage.Controls.Add(browser) ' Add the browser to the
tab(page)
browser.Dock = DockStyle.Fill ' Fill the tab page
withit.
browser.Enabled = True ' Enable it

TabControl1.TabPages.Add(newPage) ' Add the tab page to the
tab control
TabControl1.Visible = True

browser.Navigate2(cboAddress.Text)
browser.Silent = False
newPage.ToolTipText = Text
Debug.WriteLine("NP :" & newPage.TabIndex)
Debug.WriteLine("Name :" & newPage.Text.ToString())
' browser.Navigate2("about:blank") ' Set initial page to
blank()
cboAddress.Text = String.Empty
End Sub



Nov 21 '05 #3
Supra,

That needs almost no code.
When the axwebbrowser is not in your toolbox

Open the toolbox rightclick on, choose Com and check the checkbox Microsoft Webbrowser

Create a new form and drag to that a tabcontrol
Create in that 2 tabpages
Drag on every tabpage a button
Drag on every tabpage an axwebbrowser from your toolbox
Click on the two buttons to create events from both
Set in those
Me.AxWebBrowser1.Navigate2("www.google.com")
And
Me.AxWebBrowser1.Navigate2("msdn.microsoft.com")

Sample ready

I hope this helps?

Cor
"Supra" <su*****@rogers.com>

do u have code to send me so i can take a look at it and see how it works?
Cor Ligthert wrote:

Supra,

I made a form with a tabcontrol with two tabpages on it.
Dragged to both a button
Dragged to both a axwebbrowser

It works exactly as I expected.

Until now I never saw somebody in this newsgroups who succeeded to use the
axwebbrowser without draging it on a form (not that I say that it is
impossible however it will be probably a lot of work and dragging does all
the settings in the RESX)

I hope this helps?

Cor
"Supra" <su*****@rogers.com>

I have a tab control in a which a few of the tabs include an AxWebBrowser
browser control. Let say i have currently tabpage2 and i typed url in
combobox when i pressed enter it doesn't display webbrowser instead i can
do create new tab. ne one knows how to display currrently displayed
regardless of tabpage(s)?
here is code:
Public Sub AddBrowserTab()
AxWebBrowser1.Visible = False
Dim newPage As TabPage = New TabPage(Text) ' Delcare and create
the tab page
Dim browser As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser
' Declare and create the browser(control)
newPage = New TabPage(Text)
browser = New AxSHDocVw.AxWebBrowser
newPage.Controls.Add(browser) ' Add the browser to the
tab(page)
browser.Dock = DockStyle.Fill ' Fill the tab page
withit.
browser.Enabled = True ' Enable it

TabControl1.TabPages.Add(newPage) ' Add the tab page to the
tab control
TabControl1.Visible = True

browser.Navigate2(cboAddress.Text)
browser.Silent = False
newPage.ToolTipText = Text
Debug.WriteLine("NP :" & newPage.TabIndex)
Debug.WriteLine("Name :" & newPage.Text.ToString())
' browser.Navigate2("about:blank") ' Set initial page to
blank()
cboAddress.Text = String.Empty
End Sub


Nov 21 '05 #4
thank!

Cor Ligthert wrote:
Supra,

That needs almost no code.
When the axwebbrowser is not in your toolbox

Open the toolbox rightclick on, choose Com and check the checkbox
Microsoft Webbrowser

Create a new form and drag to that a tabcontrol
Create in that 2 tabpages
Drag on every tabpage a button
Drag on every tabpage an axwebbrowser from your toolbox
Click on the two buttons to create events from both
Set in those
Me.AxWebBrowser1.Navigate2("www.google.com <http://www.google.com>")
And
Me.AxWebBrowser1.Navigate2("msdn.microsoft.com <http://www.google.com>")

Sample ready

I hope this helps?

Cor

"Supra" <su*****@rogers.com <mailto:su*****@rogers.com>>

do u have code to send me so i can take a look at it and see how
it works?
Cor Ligthert wrote:
Supra,

I made a form with a tabcontrol with two tabpages on it.
Dragged to both a button
Dragged to both a axwebbrowser

It works exactly as I expected.

Until now I never saw somebody in this newsgroups who succeeded to use the
axwebbrowser without draging it on a form (not that I say that it is
impossible however it will be probably a lot of work and dragging does all
the settings in the RESX)

I hope this helps?

Cor
"Supra" <su*****@rogers.com>
I have a tab control in a which a few of the tabs include an AxWebBrowser
browser control. Let say i have currently tabpage2 and i typed url in
combobox when i pressed enter it doesn't display webbrowser instead i can
do create new tab. ne one knows how to display currrently displayed
regardless of tabpage(s)?
here is code:
Public Sub AddBrowserTab()
AxWebBrowser1.Visible = False
Dim newPage As TabPage = New TabPage(Text) ' Delcare and create
the tab page
Dim browser As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser
' Declare and create the browser(control)
newPage = New TabPage(Text)
browser = New AxSHDocVw.AxWebBrowser
newPage.Controls.Add(browser) ' Add the browser to the
tab(page)
browser.Dock = DockStyle.Fill ' Fill the tab page
withit.
browser.Enabled = True ' Enable it

TabControl1.TabPages.Add(newPage) ' Add the tab page to the
tab control
TabControl1.Visible = True

browser.Navigate2(cboAddress.Text)
browser.Silent = False
newPage.ToolTipText = Text
Debug.WriteLine("NP :" & newPage.TabIndex)
Debug.WriteLine("Name :" & newPage.Text.ToString())
' browser.Navigate2("about:blank") ' Set initial page to
blank()
cboAddress.Text = String.Empty
End Sub



Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TMB333 | last post by:
I've researched as much as I can on the issue, but I've not found any clearly defined statement that acknowledges that the Hide method for a TabPage object just doesn't do what it's supposed to do....
9
by: Robb Gilmore | last post by:
Hello, This is probably an easy one, but I have not been able to figure it out so far. I have a tab control on a windows forms app. Depending on some business logic, I need to hide/show some...
2
by: JG | last post by:
Hi, I have a windows form with a TabControl on it. It has 3 tabpages on it. I have also coded a button that is supposed to 'add' a new tabpage. The code in that clicked event looks like this:...
1
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
3
by: Cynthia | last post by:
I knew that "Hide" doesn't work with Tabpage if I want to hide it. I should use Remove/Add. But I have some other controls in the tabpage which I don't want to use code to dynamiclly create them....
8
by: touf | last post by:
Hi, I've a tabcontrol that contains many similar tabpages (exactly the same structure with different information), the tabpages number isn't known in the design time it depends of the data. Is...
4
by: Ratan | last post by:
I have a form that has a tabcontrol with 5 tabpages. i want to rename the tabpages in runtime. Actually i want to right click the tabpage i want to rename and edit the text there itself. How to...
6
by: ray well | last post by:
i want a user to be able to change tab pages thru the keyboard, i tried entering the TabPage.text as '&1 Names', "&2 Addresses', etc., so that the user can change pages by type ALT 1, ALT 2, on the...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello gurus, I want to have a Form with a TabControl, this TabControl will contain TabPage that has controls in it, this TabPage is prepared at design time. I want in runtime to duplicate the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.