Xojo WebView2 Build option?

Hi,
For a Windows Build requiring browser/HTMLViewer functionality a release of over 1/4 GB (275MB+) is far too large.

With WebView2 now being a part of Windows, Xojo ought to have it as an option. Of course that ought not remove the current build situation.

Note, I am not referring to a paid option from MBS or any other company. I am referring to a WebView2 Build option.

Can anyone from Xojo reply and inform?

There is a feature request already feedback://showreport?report_id=59961 but Xojo seems to be moving in the opposite direction. They completely removed the renderer option in the new DesktopHTMLViewer control, so it’s always CEF on Windows.

But I’ve been reconsidering my position on WebView2. I do use the MBS option, but I get lots of strange behavior that ends up making the control more problematic than just using CEF. I do things like check for to make sure support is actually available on the system, but I still get exceptions sometimes and the WebView2 installer needs to be rerun. Or it’ll just hang sometimes. I have no way of determining if these are my bugs, MBS bugs, or WebView2 bugs. So I’m less convinced WebView2 support is something that’ll actually be helpful.

1 Like

Interesting. A bona fide case of better ‘safe’ with CEF than sorry. That file size though :astonished:

In all honesty, if you were truly concerned with application size, Xojo wouldn’t not be your best coding choice - apart from CEF even. :nerd_face:

Solution for you -

Add an OLEContainer to your window, & in the opening event place the following -

Var v As Variant
Var params(1) As Variant

params(1) = "http://www.wikipedia.org/"

Me.ProgramID = "Shell.Explorer"

If Me.Create Then
  Me.Content.Invoke("Navigate", params)
End If

me.Refresh(True)

Wallah - Black Magic OleContainer Code to load IExplorer control even though it’s no longer part of Xojo :slight_smile:

Are you serious, Internet Explorer ??? By the way, it will be pulled from Windows soon, so that will not work for a long time.

Just had this debate in another forum thread as I was under the impression it was done also. BUT - it appears will be around until 2029.

Explorer? I’d rather have my content rendered by a cactus.

4 Likes

lol but then you’d need to worry about spines in lieu of size :smiley:

Could always compile the WebView2 Active X control (wrapper) for C# then just load it in an OLEContainer :wink: Then you also have fully access to the underlying code should it need to be recompiled in C#?