Bart Syryn (Partner) asked a question.

Microsoft Webview2 control

Hello,

In our application we have a form and on that form there's a webbrowser-component to show google-maps. That's working for years without any problem. The webbrowser uses by default the old internet-explorer, and now google maps give me a warning that browser isn't supported.

Information about the warning:

Error Messages | Maps JavaScript API | Google Developers

The suggested solution with adding in the metaheader doesn't solve the problem.

<meta http-equiv="x-ua-compatible" content="IE=edge">

 

So I was looking at using the new webview2 component.

I've added the following three dll to my assemblies, version 1.0.1072.54 - 32 bit:

Microsoft.Web.WebView2.Core.dll

Microsoft.Web.WebView2.WinForms.dll

Microsoft.Web.WebView2.Wpf.dll

And then I could add the webview2 component to my toolbox and place it on a form.

 

Running that form, the component doesn't work. I don't get any errors, but I also don't see the component (changed color etc).

 

Has anyone succeeded running that component (I have OE11.3 and OE11.6 32 bit).

Or another solution is to stick with current webbrowser component, but then I need to solve the warning about unsupported browser.

 

I hope someone can help me with this.

 

Regards,

Bart S

 


    • Bart Syryn (Partner)

      Hi, I'll have a look at it, but I've read that it isn't easy to implement an a bit unstable. I only one to show a html-pages that is locally on the client-pc and then shows the google maps page.

    • Bart Syryn (Partner)

      Yes, I've installed the x86 version. What I was wondering, if I could get that working, does the same installer need to be run on the client pc's ? so, not just copy the three .dll files and add them to the assemblies.xml ?

      • Lieven De Foor (b-inside)

        Yes, the runtime needs to be installed on every client machine as well.

        There are some options Microsoft gives you: you can use their online installer, or use an offline package, or even a fixed version. These can either be shipped/packaged with your product installer, or the installer can fetch these programmatically.

        We've only experimented with a manual 32-bit runtime install, corresponding to an OE 11.7 32-bit, but had no issue showing the control and loading a web page.

         

        By the way, assemblies.xml file is only needed at compile time. So end user clients don't need it. You still need to specify -assemblies to the location where the local assemblies are though. See https://knowledgebase.progress.com/articles/Article/How-does-the-Progress-client-handle-NET-assembly-loading

    • Bart Syryn (Partner)

      Hi Lieven,

      No, didn't got it working. Can place the control on a form, but can't load a website. In .net it works ....

      I'll have a look at the solution with Chromium, but didn't find the time yet.

      Regards

      Bart

  • Bart Syryn (Partner)

    Hi Lieven,

    No, didn't got it working. Can place the control on a form, but can't load a website. In .net it works ....

    I'll have a look at the solution with Chromium, but didn't find the time yet.

    Regards

    Bart

    • Thomas Wurl (Taste IT Consulting)

      Just an idea. If it works in .Net, what about a C# User Control with embedded Webview2 as .Net DLL?

      You could then embedd this User Control into your OE App.

      • Bart Syryn (Partner)

        Hi Thomas,

        That's a good idea, I assume that it would work.

        But I'll first try with the Chromium, because to deploy the webview2, you have to run an installer on every machine. For new installations that's not a problem, but for an update that more complicated because many users don't have the rights to install something on their pc.

        Regards

        Bart

         

10 of 17