bawstl

I am new to VB and have posted this in the VB forum and received a response to try posting it here. This is a VS2005 VB windows application that creates an instance of IE and a webbrowser. Navigates to a mapping website (third party) then watches for a file created with an URL that contains a find address command to place a 'X' for the location using the webbrowser.navigate2(strURL, o, "gps_map", o, o), where strURL is string of the URL read from the file, o = object nothing, "gps_map" is the frame name. The error code returned is 0x80040201. Is there something (setting a flag) that I am missing

Thanks,

Bruce



Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

Reza Nourai - MSFT

I am not very familiar with VB, but I know that Navigate2 will not accept NULLs for arguments. So, I believe the object nothing that you are passing in may be the issue here. Try passing 0 for the second argument and empty strings "" for the last two. Again, I am not very familiar with VB so I don't know if that will work or not, but you can give it a try.

-Reza





Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

bawstl

Reza,

I tried the 0 as the second param and "" as the last two but still recieve the same error. (webbrowser2.Navigate2(findurl, 0, "gps_map", "", ""))

here is a little more info from debug:

error code : -2147467259

stacktrace:
at SHDocVw.InternetExplorerClass.Navigate2(Object& URL, Object& Flags, Object& TargetFrameName, Object& PostData, Object& Headers)
at IE7Map.Form1.CheckFind(Object source, FileSystemEventArgs e) in C:\SLNET05\IE7Map\IE7Map\Form1.vb:line 137

message: Error HRESULT E_FAIL has been returned from a call to a COM component.

Any other ideas

Thanks,

Bruce





Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

Reza Nourai - MSFT

Ok, looking at the stack trace, it looks like the parameters need to be objects (so that they can be passed by reference). Create a variable for each argument instead of passing them directly into the function. Hopefully that will fix it. Otherwise, I'd have to see the code to see what is going on. Also, since I am not very familiar with VB, I might totally be missing something.

-Reza





Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

bawstl

Reza,

I changed the parameters to object type and still the same error. Do you need the solution and exta files needed or just the code

Thanks,

Bruce





Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

Reza Nourai - MSFT

Lets just look at the code for now. I will see if I can track down somebody more familiar with VB to help as well.

-Reza





Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

Reza Nourai - MSFT

So, I tried the following code and it works fine. Are you doing something different


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim browser As SHDocVw.InternetExplorer
Dim o = Nothing

Dim findurl = http://local.live.com


browser =
New SHDocVw.InternetExplorer()
browser.Navigate2(findurl, o,
"gps_map", o, o)
End Sub

-Reza





Re: Internet Explorer Extension Development webbrowser.navigate2 fails with IE7 (works with IE6)

bawstl

Reza,

I found the issue it was not with the webbrowser control it was with the trimend(" ") of the findurl string. I followed your example from above and made the findurl hard coded and it worked so I preceeded to try and figure out the issue.

Thanks,

Bruce