Working with WebView2 control

Answered
0
0

Hello.

WinForms program WebView2 in Wisej.NET
ExecuteScriptAsync class from control
Is it possible to link JavaScript from the
JavaScript from ExecuteScriptAsync class
If so, please provide an example program.

  • You must to post comments
Good Answer
0
0

Hi Kevin (ITG)

The process I wanted to know about is not Wisej.NET<–>JavsScript integration.
Browser control (WebView2) into a WindowsForms application.
* https://docs.microsoft.com/en-us/microsoft-edge/webview2/get-started/winforms
NET in the browser control from a program that incorporates the browser control into a WindowsForms application.
I would like to know how to link WinFormsApp(WebView2)<–>Wisej.NET.

  • Kevin
    • Kevin
    • May 24, 2022 - 1:57 pm
    Hi Takao, I send you 2 propositions, If you want to load a wisej app in a winform desktop app simply navigate to url(wisej app), also if you want to migrate a winforms app that usign WebView2 to a wisej app you need to replace Webview2 by WebBrowser or IFramePanel control in Wisej, but use directly WebView2 in Wisej is not supported , Happy coding, Kevin(ITG)
  • Takao Watanabe
    Hello Kevin (ITG) I was able to link the following JavaScript class by creating the following JavaScript class in Default.html. Linking from winform desktop app to Wisej.NET  Winform desktop app(Webview2.ExecuteScriptAsync)→Default.html(Wisej.NET[WebMethod])→Wisej.NET NET to winform desktop app  NET(Application.Call)→Default.html(chrome.webview.hostObjects)→winform desktop app([ClassInterface(ClassInterfaceType.AutoDual)] [ComVisible(true)])
  • You must to post comments
0
0

Hi Takao,

For executing Javascript you can check this link JavaScript – Wisej.NET and https://docs.wisej.com/docs/concepts/javascript

And below for sample

You can check also Widget for custom library if ours extensions are not sufficient.

Happy coding,

Kevin(ITG)

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.