Help WebBrowser

C

cos75

I have a Module.vb with sub main e un Form1.vb with a
WebBrowser inside.

I would load a file in a webbrowser but if I write in sub
main:

Dim form As New Form1
Dim AxWebBrowser1 As New AxSHDocVw.AxWebBrowser
AxWebBrowser1.Navigate("C:\Report dei controlli.html")

there is an error
Why?

Another question:
How to do for view in a web browser a string, is it
possible?

thanks
cos75
 
A

Armin Zingler

cos75 said:
I have a Module.vb with sub main e un Form1.vb with a
WebBrowser inside.

I would load a file in a webbrowser but if I write in sub
main:

Dim form As New Form1
Dim AxWebBrowser1 As New AxSHDocVw.AxWebBrowser
AxWebBrowser1.Navigate("C:\Report dei controlli.html")

there is an error
Why?


Would have been nice if you mentioned which one.

....

I checked it now: InvalidActiveXStateException. Same as you get? I guess the
control must be visible on a Form to be able to navigate.

Another question:
How to do for view in a web browser a string, is it
possible?

Pardon?


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
G

Guest

Yes....InvalidActiveXStateException.....but if I insert the code inside the sub AxWebBrowser1_Enter there isn't error
 
G

Guest

Dim form As New Form
Dim AxWebBrowser1 As New AxSHDocVw.AxWebBrowse
AxWebBrowser1.Visible = Tru
AxWebBrowser1.Navigate("c:\Report dei controlli.html"

Again show error
 
C

Cor Ligthert

Hi Cos,

How did you place your browser on your form.
The simplest way is to put it in your toolbax and than drag it to your form.

For me that always go right.
With all other methods I have sometimes problems.

I hope this helps?

Cor
 
A

Armin Zingler

A

Armin Zingler

C

Cor Ligthert

Hi Cos,

You can use in the Navigate all you can use in the Url combobox from
Internet Explorer.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top