AxBrowse (WebBrowser) questions...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Noozer

    #1

    AxBrowse (WebBrowser) questions...

    I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few
    difficulties with it. Just looking for a few pointers, not whole solutions
    here. I've tried looking at the MSDN help files with little success.

    - When a new window is trying to pop up, how do I determine the target URL?
    How can I get the page to open in the current browser control?

    - When printing from the webbrowser control is there a way to ensure it
    prints the whole page, including frames?

    - How can I "scrape" the web document for data? If frames are involved what
    extra programming do I need to do?

    - How can I prevent a webpage from resizing the webBrowser control? I know
    about the
    WindowSetWidth, etc., events but I can't see a way to cancel the event.

    - A few website work fine in IE, but do not work in the WebBrowser control.
    These pages usually involve some kind of login. (These are Intranet sites so
    I can't provide an example URL). Are there any settings or issues that could
    be causing this? Cookies/Sessions? Browser identification? What can I do to
    make my WebBrowser look like an IE window to web apps?

    - Is there another browser control than the AxBrowse control that is freely
    available?

    Thanks!



  • mayayana

    #2
    Re: AxBrowse (WebBrowser) questions...

    If you're using a 3rd-party control you have to go to them
    for documentation. Did you know there's a VB WebBrowser
    control? It's essentially an IE window, with properties nearly
    identical to the InternetExplore r.Application object. You can get it
    by adding a reference to "Microsoft Internet Controls". (It actually
    shows up in both references and components windows. To pick
    it from the components dialogue you can just browse to
    SHDOCVW.DLL.
    [color=blue]
    > I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few
    > difficulties with it. Just looking for a few pointers, not whole solutions
    > here. I've tried looking at the MSDN help files with little success.
    >
    > - When a new window is trying to pop up, how do I determine the target[/color]
    URL?[color=blue]
    > How can I get the page to open in the current browser control?
    >
    > - When printing from the webbrowser control is there a way to ensure it
    > prints the whole page, including frames?
    >
    > - How can I "scrape" the web document for data? If frames are involved[/color]
    what[color=blue]
    > extra programming do I need to do?
    >
    > - How can I prevent a webpage from resizing the webBrowser control? I know
    > about the
    > WindowSetWidth, etc., events but I can't see a way to cancel the event.
    >
    > - A few website work fine in IE, but do not work in the WebBrowser[/color]
    control.[color=blue]
    > These pages usually involve some kind of login. (These are Intranet sites[/color]
    so[color=blue]
    > I can't provide an example URL). Are there any settings or issues that[/color]
    could[color=blue]
    > be causing this? Cookies/Sessions? Browser identification? What can I do[/color]
    to[color=blue]
    > make my WebBrowser look like an IE window to web apps?
    >
    > - Is there another browser control than the AxBrowse control that is[/color]
    freely[color=blue]
    > available?
    >
    > Thanks!
    >
    >
    >[/color]


    Comment

    • Noozer

      #3
      Re: AxBrowse (WebBrowser) questions...

      Argh!

      I'm an idiot...

      I *AM* using the Microsoft Internet Controls... No wonder I was having so
      much trouble finding help. Of course I still have the same questions - just
      about the VB WebBrowser control. : )

      Thanks for making me take a second look.


      "mayayana" <mayaXXyaYYna1a @mindZZspring.c om> wrote in message
      news:UI3oc.5783 $KE6.83@newsrea d3.news.atl.ear thlink.net...[color=blue]
      > If you're using a 3rd-party control you have to go to them
      > for documentation. Did you know there's a VB WebBrowser
      > control? It's essentially an IE window, with properties nearly
      > identical to the InternetExplore r.Application object. You can get it
      > by adding a reference to "Microsoft Internet Controls". (It actually
      > shows up in both references and components windows. To pick
      > it from the components dialogue you can just browse to
      > SHDOCVW.DLL.
      >[color=green]
      > > I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a[/color][/color]
      few[color=blue][color=green]
      > > difficulties with it. Just looking for a few pointers, not whole[/color][/color]
      solutions[color=blue][color=green]
      > > here. I've tried looking at the MSDN help files with little success.
      > >
      > > - When a new window is trying to pop up, how do I determine the target[/color]
      > URL?[color=green]
      > > How can I get the page to open in the current browser control?
      > >
      > > - When printing from the webbrowser control is there a way to ensure it
      > > prints the whole page, including frames?
      > >
      > > - How can I "scrape" the web document for data? If frames are involved[/color]
      > what[color=green]
      > > extra programming do I need to do?
      > >
      > > - How can I prevent a webpage from resizing the webBrowser control? I[/color][/color]
      know[color=blue][color=green]
      > > about the
      > > WindowSetWidth, etc., events but I can't see a way to cancel the event.
      > >
      > > - A few website work fine in IE, but do not work in the WebBrowser[/color]
      > control.[color=green]
      > > These pages usually involve some kind of login. (These are Intranet[/color][/color]
      sites[color=blue]
      > so[color=green]
      > > I can't provide an example URL). Are there any settings or issues that[/color]
      > could[color=green]
      > > be causing this? Cookies/Sessions? Browser identification? What can I do[/color]
      > to[color=green]
      > > make my WebBrowser look like an IE window to web apps?
      > >
      > > - Is there another browser control than the AxBrowse control that is[/color]
      > freely[color=green]
      > > available?
      > >
      > > Thanks!
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • mayayana

        #4
        Re: AxBrowse (WebBrowser) questions...

        I don't know the answers to any of your questions offhand,
        but I can tell you this much: Once a page is loaded you can access
        the document object as an mshtml.HTMLDocu ment. That provides
        full access to the document object model of IE. Set a reference
        to MSHTML.DLL to get object browser help and "intellisen se" for
        the DOM.

        In the WB_DocumentComp lete event sub do:

        If Not WB.document Is Nothing Then
        Set Doc = WB.document '-- where Doc has been declared as an
        mshtml.HTMLDocu ment.

        That will get you access to the page tags, body text, frames, etc.
        in the same way that you can access them with DHTML.

        -------------------------

        The WB itself is the same as the InternetExplore r object. You
        can check it in the object browser and should be able to find
        both on MSDN (to the extent that one can find anything on MSDN).
        It's true, though, that there's not much sample code around for
        the WB.

        --
        --
        Noozer <dont.spam@me.h ere> wrote in message
        news:kKaoc.4481 96$Ig.419280@pd 7tw2no...[color=blue]
        > Argh!
        >
        > I'm an idiot...
        >
        > I *AM* using the Microsoft Internet Controls... No wonder I was having so
        > much trouble finding help. Of course I still have the same questions -[/color]
        just[color=blue]
        > about the VB WebBrowser control. : )
        >
        > Thanks for making me take a second look.
        >
        >
        > "mayayana" <mayaXXyaYYna1a @mindZZspring.c om> wrote in message
        > news:UI3oc.5783 $KE6.83@newsrea d3.news.atl.ear thlink.net...[color=green]
        > > If you're using a 3rd-party control you have to go to them
        > > for documentation. Did you know there's a VB WebBrowser
        > > control? It's essentially an IE window, with properties nearly
        > > identical to the InternetExplore r.Application object. You can get it
        > > by adding a reference to "Microsoft Internet Controls". (It actually
        > > shows up in both references and components windows. To pick
        > > it from the components dialogue you can just browse to
        > > SHDOCVW.DLL.
        > >[color=darkred]
        > > > I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a[/color][/color]
        > few[color=green][color=darkred]
        > > > difficulties with it. Just looking for a few pointers, not whole[/color][/color]
        > solutions[color=green][color=darkred]
        > > > here. I've tried looking at the MSDN help files with little success.
        > > >
        > > > - When a new window is trying to pop up, how do I determine the target[/color]
        > > URL?[color=darkred]
        > > > How can I get the page to open in the current browser control?
        > > >
        > > > - When printing from the webbrowser control is there a way to ensure[/color][/color][/color]
        it[color=blue][color=green][color=darkred]
        > > > prints the whole page, including frames?
        > > >
        > > > - How can I "scrape" the web document for data? If frames are involved[/color]
        > > what[color=darkred]
        > > > extra programming do I need to do?
        > > >
        > > > - How can I prevent a webpage from resizing the webBrowser control? I[/color][/color]
        > know[color=green][color=darkred]
        > > > about the
        > > > WindowSetWidth, etc., events but I can't see a way to cancel the[/color][/color][/color]
        event.[color=blue][color=green][color=darkred]
        > > >
        > > > - A few website work fine in IE, but do not work in the WebBrowser[/color]
        > > control.[color=darkred]
        > > > These pages usually involve some kind of login. (These are Intranet[/color][/color]
        > sites[color=green]
        > > so[color=darkred]
        > > > I can't provide an example URL). Are there any settings or issues that[/color]
        > > could[color=darkred]
        > > > be causing this? Cookies/Sessions? Browser identification? What can I[/color][/color][/color]
        do[color=blue][color=green]
        > > to[color=darkred]
        > > > make my WebBrowser look like an IE window to web apps?
        > > >
        > > > - Is there another browser control than the AxBrowse control that is[/color]
        > > freely[color=darkred]
        > > > available?
        > > >
        > > > Thanks!
        > > >
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • George Copeland

          #5
          Re: AxBrowse (WebBrowser) questions...

          "Noozer" <dont.spam@me.h ere> wrote in message
          news:m_Snc.4389 84$oR5.29230@pd 7tw3no...
          [color=blue]
          > I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few
          > difficulties with it. Just looking for a few pointers, not whole solutions
          > here. I've tried looking at the MSDN help files with little success.[/color]

          Most VB programmers use shdocvw.dll for browser functionality. This
          component is easy to program, is *almost always* avaliable on the client,
          and is free. There are tons of resources on MSDN and sample code for
          implementing this control. Good luck with your development effort.


          Comment

          • David Wimbush

            #6
            Re: AxBrowse (WebBrowser) questions...

            Here's the URL for the WebBrowser control documentation:

            http://msdn.microsoft.com/library/de...RefList_VB.asp

            Comment

            Working...