Webview2-Control (Microsoft-Edge) as a replacement for Internet Explorer Control

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
ArneOrtlinghaus
Posts: 412
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

Webview2-Control (Microsoft-Edge) as a replacement for Internet Explorer Control

Post by ArneOrtlinghaus »

We have succeeded integrating the Webview2-Control in X# both with the VO-GUI-classes and with Winforms. Google has announced that they want to block Google Maps in Internet Explorer from end of November. Therefore it is important for us.

-Every client computer must install the Runtime.
We have decided to use the "WebView2 - Evergreen Runtime". This is automatically updated together with Windows Updates after the first installation.
https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#the-evergreen-runtime-distribution-mode
https://docs.microsoft.com/en-us/micros ... ution-mode

The installation program can be found under:
https://go.microsoft.com/fwlink/p/?LinkId=2124703

- Attached is MultiMediaControlvogui.zip is the code for the VO-GUI that works together with WebView2 and Internet Explorer Control. The code is not so complicated. The Winforms control behaves similar to the Internet Explorer Control. The correct delivery is more important:
- Every execution directory (the exe files/dlls) must contain files as in the attachment MicrosoftWebWebView2execompilefiles.zip.
- The two Microsoft.Web.WebView2.WinForms.dll and Microsoft.Web.WebView2.Core.dll in the same directory
- The file WebView2Loader.dll must be exactly in the subdirectories as in the zip file.
- In the own assembly a reference to the Microsoft.Web.WebView2.WinForms.dll must be added.

The code for creating the object is in a "old-fashioned" manner using Callclipfunc and typeless objects. I have made this intentionally. So the asssembly is loaded also if the runtime files Microsoft.Web.WebView2.WinForms.dll and Microsoft.Web.WebView2.Core.dll in the execution directory are missing or cannot be loaded.

Arne
wfxs.png
wfxs.png (55.73 KiB) Viewed 595 times
Attachments
Webview2integration.zip
(158.44 KiB) Downloaded 89 times
Post Reply