IE clone with Tabpages

Invisionsoft

Well-known member
Joined
Apr 20, 2007
Messages
64
Location
United Kingdom
Programming Experience
1-3
Hello, I am creating an IE clone using a Tabcontrol. I have a script to add tabs

dim tabby as new Tab()
tabby.controls.add (wb) (wb is the webbrowser)
tabcontrol1.tabpages.add(tabby)

It works great.

But I am struggling with navigating in the webbrowser. Say I type

tabcontrol1.selectedtabpage.controls ("wb").navigate("google.com")

I cannot navigate because the navigate property is not a standard one (i.e. control specific) has any one any suggestions on how to fix this so I can navigate I have no trouble accessing the properties but ofcourse I cannot navigate because the control is not "known" at design time.


Thanks in advance, James.
 
That will still work, it is called "late-binding".

You can cast the control to the specific type it is:
VB.NET:
DirectCast(TabControl1.SelectedTabPage.Controls("wb"), WebBrowser).Navigate("site")
 
Back
Top