.Net Assembly replacement for IE HTML activex
.Net Assembly replacement for IE HTML activex
Since Microsoft is planning on doing away with IE and, therefore, activex, does anyone have a suggestion for replacing our HTML Web ActiveX control in our VL Win applications? I'm looking for best in class as we use this functionality in many different VLF-Win command handlers. Thanks in advance.
David
David
Re: .Net Assembly replacement for IE HTML activex
Hi!
Looks like Microsoft is pushing this direction instead, but I haven't tried it yet:
https://docs.microsoft.com/en-us/micros ... /webview2/
Looks like Microsoft is pushing this direction instead, but I haven't tried it yet:
https://docs.microsoft.com/en-us/micros ... /webview2/
Re: .Net Assembly replacement for IE HTML activex
I read it, and downloaded the cab file, but for the life of me, I can't figure out how to install it in all my users desktops. It looks like the solution, but without some more simplistic instructions, I guess I'm just an old fart!
-
- Posts: 49
- Joined: Thu Oct 10, 2019 9:32 am
Re: .Net Assembly replacement for IE HTML activex
Hi David,
You can download the install file from here: https://www.nuget.org/packages/Microsoft.Web.WebView2
Use Package Manager to install this: https://docs.microsoft.com/en-us/window ... er/winget/
You can download the install file from here: https://www.nuget.org/packages/Microsoft.Web.WebView2
Use Package Manager to install this: https://docs.microsoft.com/en-us/window ... er/winget/
- Attachments
-
- PackageManager
- PackageManager_WinGet.png (51.97 KiB) Viewed 12103 times
Re: .Net Assembly replacement for IE HTML activex
SOLUTION!!!!!
I found a solution. Rather than using WebView2, you can use System.Windows.Forms.dll. It has a class called WebBrowser and it works very well. You will probably have it on your desktop as it is usually in developer's packages. I found mine in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\ . To distribute it, just copy the dll and the xml files to your partition execute directory at deployment. Here is a sample of the easy code to navigate:
Define_Com Class(#netWebView.System.Windows.Forms.WebBrowser) Name(#WebBrowser) Parent(#COM_OWNER) DisplayPosition(1) TabPosition(4) Left(0) Top(69) Height(456) Width(746)
Mthroutine Name(URLNavigate)
Define_Map For(*INPUT) Class(#prim_alph) Name(#pathName)
#WebBrowser.Navigate#1 urlString(#pathName)
Endroutine
I found a solution. Rather than using WebView2, you can use System.Windows.Forms.dll. It has a class called WebBrowser and it works very well. You will probably have it on your desktop as it is usually in developer's packages. I found mine in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\ . To distribute it, just copy the dll and the xml files to your partition execute directory at deployment. Here is a sample of the easy code to navigate:
Define_Com Class(#netWebView.System.Windows.Forms.WebBrowser) Name(#WebBrowser) Parent(#COM_OWNER) DisplayPosition(1) TabPosition(4) Left(0) Top(69) Height(456) Width(746)
Mthroutine Name(URLNavigate)
Define_Map For(*INPUT) Class(#prim_alph) Name(#pathName)
#WebBrowser.Navigate#1 urlString(#pathName)
Endroutine
Re: .Net Assembly replacement for IE HTML activex
David: That works great! I tested my two go to URL's, google.com and espn.com. espn.com had many script errors. Not that I'd use it for espn but it makes me wonder the version of the "browser" that it's using.
Art Tostaine
Re: .Net Assembly replacement for IE HTML activex
Art
That is certainly a possibility. I have been using Edge or a Chromium based browser for all my work. Try possibly changing the default browser and see what happens
That is certainly a possibility. I have been using Edge or a Chromium based browser for all my work. Try possibly changing the default browser and see what happens
Re: .Net Assembly replacement for IE HTML activex
I use Chrome (my current default) or Chromium Edge as well. I'm not worried about the script errors. I need to test it on the internal sites we use. Thanks again
Art Tostaine
Re: .Net Assembly replacement for IE HTML activex
well done!
I tried it in my computer and it says IE 11.... so still not using Edge, but at least not using activex it is dot net now:
I tried it in my computer and it says IE 11.... so still not using Edge, but at least not using activex it is dot net now:
Code: Select all
#COM_OWNER.URLNavigate pathName("https://www.whatsmybrowser.org/")
- Attachments
-
- whatbrowseriamusing.jpg (98.5 KiB) Viewed 3576 times
Re: .Net Assembly replacement for IE HTML activex
That explains the script errors. Maybe they will at least keep updating this.
Art Tostaine
Re: .Net Assembly replacement for IE HTML activex
Hi David,
I'm also investigating an issue related to this. I've tried the instructions you've mentioned.
Please see screenshot below.
Is this correct? But when I tried to copy the logic for the define com on Lansa IDE, I encountered this error. May I know if there are additional setup that I may have missed for this error to occur? Thanks.
I'm also investigating an issue related to this. I've tried the instructions you've mentioned.
Please see screenshot below.
Is this correct? But when I tried to copy the logic for the define com on Lansa IDE, I encountered this error. May I know if there are additional setup that I may have missed for this error to occur? Thanks.
Re: .Net Assembly replacement for IE HTML activex
Hi Rigor,
Did you registered the .net component in the LANSA Repository?
File, New, .Net Component,
use netWebView as name
and then select the .net componet to generate the lansa code,
save and try again.
Did you registered the .net component in the LANSA Repository?
File, New, .Net Component,
use netWebView as name
and then select the .net componet to generate the lansa code,
save and try again.
Re: .Net Assembly replacement for IE HTML activex
Hi Dino,
Thank you for your response.
It resolve my issue with the Component Class not found and I was able to make it work.
Additional question, is there a way to change IE11 and use Google Chrome instead as the Web Browser for the Component Class?
I've already disabled Internet Explorer 11 on my VM and made the Google Chrome as my default browser but the Command Handler still shows IE11 as my browser.
Thanks.
Thank you for your response.
It resolve my issue with the Component Class not found and I was able to make it work.
Additional question, is there a way to change IE11 and use Google Chrome instead as the Web Browser for the Component Class?
I've already disabled Internet Explorer 11 on my VM and made the Google Chrome as my default browser but the Command Handler still shows IE11 as my browser.
Thanks.
Re: .Net Assembly replacement for IE HTML activex
Looking at Microsoft's documentation on the control at https://docs.microsoft.com/en-us/dotnet ... esktop-6.0 I see this : "The WebBrowser control is a managed wrapper for the ActiveX WebBrowser control, and uses whichever version of the control is installed on the user's computer."
I wonder whether the Microsoft Control will still have the dependency on the Active-X and this will still be tied to IE11, despite what the Windows default browser is set to.
I wonder whether the Microsoft Control will still have the dependency on the Active-X and this will still be tied to IE11, despite what the Windows default browser is set to.
Re: .Net Assembly replacement for IE HTML activex
I've tried to work on an alternative using ANTVIEW which also uses MS WebView2(https://antview.dev/installation/).
I was able to do the installation steps but encountered this error on VL IDE. I've done the same steps on creating a .Net Component for System.Windows.Form before. May I know if you encountered similar issue before? And if possible, how to resolve the issue? Steps Taken:
Successfully installed AntView. Registered AntView Copied the WebView2Loader DLL to the Partition Execute Folder.
I was able to do the installation steps but encountered this error on VL IDE. I've done the same steps on creating a .Net Component for System.Windows.Form before. May I know if you encountered similar issue before? And if possible, how to resolve the issue? Steps Taken:
Successfully installed AntView. Registered AntView Copied the WebView2Loader DLL to the Partition Execute Folder.
Re: .Net Assembly replacement for IE HTML activex
Based on the AntVIew documentation, it is shipping an OCX file, which is an ActiveX control.
Can you retry using New->ActiveX rather than attempting to load an ActiveX as a .Net Component ?
Can you retry using New->ActiveX rather than attempting to load an ActiveX as a .Net Component ?
Re: .Net Assembly replacement for IE HTML activex
Hi All,
I created a guide for installing AntView as well as sample components to show how to use it.
I created a guide for installing AntView as well as sample components to show how to use it.
- Attachments
-
- AntView guide and samples.rar
- (2.77 MiB) Downloaded 14 times