LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using different WebBrowser ActiveX

HI,

 

in my labwinodws/CVI 2020 project I use the activeX Microsoft WebBrowser. THE problem I'm having is that it no longer displays pages correctly and always shows errors for js scripts.
I believe this is due to the fact that activeX is based on internet explorer.
Is there a working alternative to this activex? Maybe based on Edge?

 

Hello,

Mattia

0 Kudos
Message 1 of 5
(153 Views)

Not as ActiveX Control, you will have to move to use the WebView2 .Net Control.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(121 Views)

Do you have any suggestions on how to integrate it?

 

Thanks,

Mattia

0 Kudos
Message 3 of 5
(111 Views)

@Mattia.G wrote:

Do you have any suggestions on how to integrate it?

 

Thanks,

Mattia


I'm afraid you would have to create an interface library for WebView2, similar to what is contained in the <CVI>\samples\dotnet\mscorlib2.[c;h;fp] for the classes and methods needed. Additional difficulties will be to create the bridge to integrate the .Net Control with this interface.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(102 Views)

I'm afraid, I mislead you. There is no .Net UI Container in LabWindows/CVI like in LabVIEW. So I'm afraid you could not integrate the WebView2 .Net Control easily into a LabWindows/CVI front panel. I'm sure there are possibilities that would likely involve getting a native Windows window handle assigned as a child window into a LabWindows/CVI front panel, but that is likely a major hassle to get working.

 

After a bit of researching, you would most likely have to call CreateCoreWebView2Environment() from the WebView shared library. This interface is COM based and exposes the COM interfaces as also use in the dotnet examples for all the various system classes.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(89 Views)