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