Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Retrieve URL from Web Browser

Retrieve URL from Web Browser

Scheduled Pinned Locked Moved Visual Basic
jsontutorialquestionlounge
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Angad Singh
    wrote on last edited by
    #1

    Hello, Can anybody plz tell me how do i retrieve URL from a Web Browser in VB. i dont want only for Internet Explorer but it shuld be general and work for every browser. Atleast tell me the API or the steps of how to start. Some explainations would be nice. Thanks Angad

    H M 2 Replies Last reply
    0
    • A Angad Singh

      Hello, Can anybody plz tell me how do i retrieve URL from a Web Browser in VB. i dont want only for Internet Explorer but it shuld be general and work for every browser. Atleast tell me the API or the steps of how to start. Some explainations would be nice. Thanks Angad

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      It's different for every web browser because they are architected differently. For IE, you can either host the WebBrowser control and use the LocationURL property. To do it from an outside process, you'll have to search the running Windows classes for the correct class, search it's child windows for the address bar, and read the text out of it (or get an instance of the IWebBrowser2 interface from the app, but this can be more difficult). For Mozilla/Netscape, there's different ways. You could use the same approach from an outside application as I outlined above, but the Windows classes would be different for both the browser and the address bar. Same goes for Opera and the other browsers. There is no single way of doing this for all browsers.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      1 Reply Last reply
      0
      • A Angad Singh

        Hello, Can anybody plz tell me how do i retrieve URL from a Web Browser in VB. i dont want only for Internet Explorer but it shuld be general and work for every browser. Atleast tell me the API or the steps of how to start. Some explainations would be nice. Thanks Angad

        M Offline
        M Offline
        Mike Ellison
        wrote on last edited by
        #3

        What are you trying to accomplish? Are you writing vb code in an .aspx file and need to get the current URL (server end programming)? Are you writing (client end) vb script in a web page? This might be a simple answer depending on what you're trying to do. Can you be more specific?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups