cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

How to use WebView2 control in LabView?

Resolvido!
Ir para a solução

Thanks Greg, when you copied the .dlls into the LabVIEW folder, which .dlls did you copy or did you just paste the entire unzipped nuget package into the LabVIEW folder?

 

I have tried many different combinations but keep getting an error when pointing the .net control to the .dll.

 

 

 

 

0 Kudos
Mensagem 21 de 32
5.725Exibições

I know there have been a lot of examples here, and I apologize for being dense, but I cannot get any web pages to load. It seems like the source never loads, not sure if it is a company firewall thing or not, any ideas?

 

Thanks

mcduff

0 Kudos
Mensagem 22 de 32
5.619Exibições

Never mind, I am really dense. I got the nuget packages but forgot the runtime engine.

 

Thanks

Andrew

0 Kudos
Mensagem 23 de 32
5.613Exibições

how did you solve the problem? i have the same problem and i cant fix it

Thank you

0 Kudos
Mensagem 24 de 32
5.445Exibições

Hello

I followed all the steps, but it doesn't want to work. Property node "CoreWebView2" always returns null.

If I use the "WebView2.EnsureCoreWebView2Async" invoke node and then the "Wait()" node, I always get the same error "1172" "Error 1172 occurred in the error call method of the System.Threading.Tasks invoke node. Task.Wait , (System.DllNotFoundException: Unable to load DLL 'WebView2Loader.dll': The specified module cannot be found. (Exception from HRESULT: 0x8007007E))

Possible reasons):

LabVIEW: (Hex 0x494) A .NET exception occurred in an external assembly. For information about how to correct this error, copy the following exception (in bold) and search the Microsoft Developer Network (MSDN) Web site or the Internet for a possible explanation.
System.DllNotFoundException in webview2_2 (2).vi"

Thanks

0 Kudos
Mensagem 25 de 32
5.418Exibições

Hi all,

 

thanks for your hints. I first had troubles gettings everything together, but now I think I've got it.

 

First, the VI provided by beavercreek did not work for me. I either got an empty page, forever waiting, or the DLLNotFound Exception.

 

So I modified the instantiation process so that the path of the native "Loader" dll is provided as well as the waiter for it to finish. Feel free to look into the modifed file attached.

 

Steps to get it to work:

  1. Download the WebView2 Nuget and unzip it
  2. locate the file "lib\net45\Microsoft.Web.WebView2.WinForms.dll" and either use it to insert the .net control
  3. From the unzipped file, locate the "build\native" folder and paste it in the control of the vi

 

Mensagem 26 de 32
4.987Exibições

I bundled my findings into a XControl you might test if you like

Mensagem 27 de 32
4.964Exibições

Some further improvements. Check out the github repo:

 

https://github.com/kleinsimon/LV-WebView2

 

Mensagem 28 de 32
4.934Exibições

I have been playing around with WebView2 and Labview for a while but with very mixed results.

Spaghetticoder´s X-control worked immediately for me, and even better kept working.. I even can call js-code with the included property😁. Great work!
Currently I try to get the return value from my js-function, is there a way doing this?
 

0 Kudos
Mensagem 29 de 32
4.869Exibições

I was able to figure that one out for myself, see my code attached. It can directly be used in Spaghetticoders X-control  in the run JavaScript Method.

Thanks again for providing the X-control, I learned a lot😎

0 Kudos
Mensagem 30 de 32
4.818Exibições