Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[VB6] NavigateWithWebResourceRequest not working

I'm using NavigateWithWebResourceRequest in a vb6 project.

The webpage showing is always "about:blank", but if I put a breakpoint on the line code with the call to NavigateWithWebResourceRequest and hit directly F5, the good webpage is showing.

The good webpage is also showing if I put a MSgBox juste befeore the NavigateWithWebResourceRequest call.

Do you have any idea for that error ?

Thank you

Thank you for your question.

It should work as I ran a test and "it works for me".

Here's what I did:
I went to the examples and in particular the frmFillFormDemo form.
In that example code we changed the click event for the "Zoom In" button, from zooming in, into using the navigatewithWebResourceRequest to open a page at the antwise website, like so:

Private Sub ZoomInButton_Click()
  'EdgeWebBrowser.ZoomFactor = EdgeWebBrowser.ZoomFactor + 0.1
  EdgeWebBrowser.NavigateWithWebResourceRequest "", "GET", "", ""
End Sub

Clicking on the zoom in button does result in the browser opening the main page at the web site.

The question now is why did it not work for you.

Can you show me your code?

Or if it contains sensitive parts then please send it to me by email via

For anyone reading along.
This has been resolved by email.

The problem was due to a timing issue. The WebView2 control is created asynchronously and that sometimes makes things more difficult than you would expect.
The NavigateWithWebResourceRequest was called immediately on creation of the form and that caused issues.
This was resolved by moving the NavigateWithWebResourceRequest into the OnCreateWebViewCompleted event.


Forum Jump:

Users browsing this thread: 1 Guest(s)