Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8675729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:01:05+00:00 2026-06-12T20:01:05+00:00

Programming Environment: Visual Studio 2010 Programming Language: VB.NET I have a tabbed web-browser that

  • 0

Programming Environment: Visual Studio 2010
Programming Language: VB.NET

I have a tabbed web-browser that I add dynamically, I Dim the the web-browser every-time the user clicks the New Tab button, like this: browser = New WebBrowser() and give it a name based on the tab count, e.g. browser2, if there are 2 tab pages. So my question is – about time – that how would I get the Url of the WebBrowser, I have tried Dim UrlString As String = CType(tabMain.SelectedTab.Controls.Item(browser.Name), WebBrowser).Url.ToString But, correct me if I am wrong, I found that WebBrowser isn’t classed as a Control, and the reason why I think this is because:

  1. This gives me an exception: Object reference not set to an instance of an object.
  2. So I tried looping through the controls in the tabMain.SelectedTab and found that the WebBrowser(browser) isn’t included in the collection. The code I used to loop was:

    For Each ctrl As Control In Me.tabMain.SelectedTab.Controls
    MsgBox(ctrl.Name)
    Next

Tried looping through all the Parent controls, but no sign of the WebBrowser showing up. Hope this is enough information =P

Thanks in advance.

UPDATE: Figured out the problem, really stupid, and my theory was bullshit too =P. Just ignore =] lol

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:01:06+00:00Added an answer on June 12, 2026 at 8:01 pm

    try this.

    Dim UrlString As String = CType(tabMain.Controls.Item(0), WebBrowser).Url.ToString
    

    I assume tabMain is the name of the TabControl. If this is true and each tab has a WebBrowser Control in it then it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is Visual Studio only used for programming and coding, or does it have other
I am using Visual Studio 2010 and I would like change debugging environment from
I just began Using the Visual Studio Express 2010 Environment, and I am missing
I am using Visual Studio 2010 Pro for simple C programming, I would like
In The Unix Programming Environment by K & P, it is written that The
Consider me a novice to Windows environment and COM programming. I have to automate
When reading about pipes in Advanced Programming in the UNIX Environment, I noticed that
I'm currently developing a new language for programming in a continuous environment (compare it
I realise this is an older programming environment, but I have to clean up
I've create the following class in Visual Studio 2010: public class Bat : Form1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.