Contents - Index - Top


MS WebView .net example

 

Microsoft provides a number of examples for how-to use the WebView2 control on github.

This can be very convenient when you need to troubleshoot issues with the AntView control as it allows you to isolate where the problem originates.

 

Those examples are in .net, so you would need to compile them yourself, or you can use one that we have compiled already (see below)

 

One of the standard examples is:  https://github.com/MicrosoftEdge/WebView2Samples 

We tend to use the WebView2WindowsFormsBrowser

It needs the MS VC++ runtime 2015 (see https://www.microsoft.com/en-us/download/confirmation.aspx?id=48145 in case it complains)

 

Download the compiled version from here:https://antwise.com/download/WebView2Browser-Release_x86.zip

 

 

As it is a zip file containing a binary you will have to unblock the zip in order to be able to run the binary..

Right click -> properties ->

 

Put the tick in the checkbox for unblock and hit "Apply" then you can unzip it and run the binary.

 

If it complains about cannot load MSVC140.DLL then you need to install the MSVC 2015 runtime mentioned above otherwise it should open a small example browser.

 

Another issue atm is that this .net demo only works on Windows 10 and higher as it depends on a Windows API function GetDpiForWindow which is Windows 10+. (Note that this is not an issue for AntView)

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024