Xojo WebView2 Build option?

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?

1 Like

There is a feature request already <https://xojo.com/issue/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


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.


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#?

Well, with windows 11 being adopted and the masive rollout for the preinstalled runtime on windows 10 2018+ there are no more excuses.

Xojo is is falling behind once more.


Would it not be possible to load a DLL for WebView2 ?

If you want to use WebView2 now, I highly recommend MBS plugin Monkeybread Xojo plugin - The plugin part WebView2

If you want your app to check if WebView2 is installed, it’s pretty easy. I chose to incluide the “Evergreen Bootstrapper” in my app (a 1.6MB EXE) Link

Your app can, upon opening, check to see if WebView2 is installed by checking AvailableCoreWebView2BrowserVersionString, and if it’s empty, put up a dialog asking if the user wants to install.

If they say yes, then you just launch the Bootstrapper EXE.

If you are going to mess around with DLLs, I would think you’d be better off using MBS Plugins.

I was trying to figure out if there was a way to use WebView2 in pure Xojo code (using OLE / ActiveX and/or Declares) but I never came up with a way. I think microsoft has not made WebView2 available as an OLE control…

If anyone sees a bug in our WebView2 control, which is not yet fixed, please email us.

Thaks but no thanks. For now the API 1 Native renderer works Ok. Im still NOT “downgrading” to the limited functionality API2 and will stay with Xojo 2019r2 until there are something worth the change.

Sure, there are options. It is just a shame Xojo cant keep up with the current technology