Windows Develop Bookmark and Share   
 index > Windows Forms General > controls in vb2005
 

controls in vb2005

Hi,

i have two tabpages (tabpage1 and tabpage2) with two diffrent webbrowser.
i have only one textbox (addressbox) and i want my app do the following:
if my currently active tabpage is tabpage1 and i write an url into the addressbox i want the first webbrowser (on the tabpage1) to go to that url. if the active tab is tabpage2 and i do as before (write an address into the addressbox) i want my 2nd webbrowser to go to that url. and its ok till these. but i want to add tabpages while my application runs. so if i add 2 more tabpages i have to add 2 more webbrowsers, too. and now i want to select the 4th tabpage, write an url into the addressbox and want my 4th webbrowser to go to that url. how can i do this?
any idea?
thnx a lot

Atis
Attila Fogel  Sunday, November 13, 2005 8:44 PM
i looked it up, here's the code - if anyone cares:

Function GetSelectedBrowser() As WebBrowser

Return TabControl1.TabPages(TabControl1.SelectedIndex).Controls.Item(0)

End Function

Attila Fogel  Sunday, November 13, 2005 11:22 PM
never mind, i got it now Smile
Attila Fogel  Sunday, November 13, 2005 11:21 PM
i looked it up, here's the code - if anyone cares:

Function GetSelectedBrowser() As WebBrowser

Return TabControl1.TabPages(TabControl1.SelectedIndex).Controls.Item(0)

End Function

Attila Fogel  Sunday, November 13, 2005 11:22 PM

You can use google to search for other answers

Custom Search

More Threads

• how to get mdichildren menus separated from the mdiparent menu
• c#-How to return object to parent form from child
• Window's flashing taskbar button
• Form background problem
• When does DataGridView really lose focus?
• Go to the last record in a dataset
• How to get the MainForm reference?
• Login Property
• SetParent problem
• Console in a WinForm?