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. AxWebBrowser without form support

AxWebBrowser without form support

Scheduled Pinned Locked Moved Visual Basic
csharpcomhelp
4 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.
  • S Offline
    S Offline
    Sufyan_shani
    wrote on last edited by
    #1

    Hi all! i m using AxWebBrowser in vb.net application by dragging it to the form its working fine, but i want to use it with out form's support i,e; programatically.i am doing like this '''''''''''''''''''''' Private WithEvents mybrowser As AxSHDocVw.AxWebBrowser mybrowser = New AxSHDocVw.AxWebBrowser mybrowser.Navigate("www.google.com")'Exception in this line ''''''''''''''''''''''''''''''' Exception is "Invalid ActiveXState" Any help thanks! :confused: Abu Sufyan

    D D 2 Replies Last reply
    0
    • S Sufyan_shani

      Hi all! i m using AxWebBrowser in vb.net application by dragging it to the form its working fine, but i want to use it with out form's support i,e; programatically.i am doing like this '''''''''''''''''''''' Private WithEvents mybrowser As AxSHDocVw.AxWebBrowser mybrowser = New AxSHDocVw.AxWebBrowser mybrowser.Navigate("www.google.com")'Exception in this line ''''''''''''''''''''''''''''''' Exception is "Invalid ActiveXState" Any help thanks! :confused: Abu Sufyan

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      IIRC, the control will only work when it's on a form. You can't use it without one. There's nothing preventing you from putting it on a hidden form though... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      D 1 Reply Last reply
      0
      • S Sufyan_shani

        Hi all! i m using AxWebBrowser in vb.net application by dragging it to the form its working fine, but i want to use it with out form's support i,e; programatically.i am doing like this '''''''''''''''''''''' Private WithEvents mybrowser As AxSHDocVw.AxWebBrowser mybrowser = New AxSHDocVw.AxWebBrowser mybrowser.Navigate("www.google.com")'Exception in this line ''''''''''''''''''''''''''''''' Exception is "Invalid ActiveXState" Any help thanks! :confused: Abu Sufyan

        D Offline
        D Offline
        Darshon
        wrote on last edited by
        #3

        Hi Abu, The problem I see is that you are not adding the AxWebBrowser control to anything first before trying to use it. As far as I know you have to add it to a form, TabPage, Panel or GroupdBox or something like that. You can't just tell it to appear and start using it, it must be put on something of that nature first in order to use it. But I could be wrong, I'm new at this although I just finished working with the AxWebBrowser control to do a Web Browser myself.

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          IIRC, the control will only work when it's on a form. You can't use it without one. There's nothing preventing you from putting it on a hidden form though... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          D Offline
          D Offline
          Darshon
          wrote on last edited by
          #4

          Hi Dave, You just beat me to it. lol Abu this is one of the very generous people that helped me with mine, I'd listen to him. ;)

          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