FoxPro Programming
IE ActiveX going away?
Gravatar is a globally recognized avatar based on your email address. IE ActiveX going away?
  Jeff Pace
  All
  Nov 4, 2019 @ 12:55pm

Microsoft is finalizing the Chrome browser in Win10. They are saying that, going forward, IE will not be available on new machines. Is is safe to assume that the IE ActiveX control will also not be available?

This will be a big problem for us.

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Jeff Pace
  Jeff Pace
  Nov 4, 2019 @ 02:37pm

To clarify:

IE11 will probably remain in the win10 code base for awhile to accomodate legacy intranets. However, that may be limited to Windows Server products. I quess the question is how many legacy applications rely on the web browser control for use on Windows 10 Home, Pro, and Enterprise. Ours certianly does.

We use the web browser control to embed Windows Media Player in our software, and it works well. So far, we have not been able to find a replacement.

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Harvey Mushman
  Jeff Pace
  Nov 5, 2019 @ 09:24am

I was talking to Rick Strahl about this exact issue, IE11 going forward. He indicated that Edge is already an alternative solution. No clue what it's active-X footprint looks like but one can only assume it is similar to IE11 but improved.

If you do test Edge, please post back your findings.

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Jeff Pace
  Harvey Mushman
  Nov 5, 2019 @ 11:42am

From what I have read, Edge and the new MS Chrome browser will not have an ActiveX component. The good news for now is that IE11 is built into the Win10 OS code base. The bad news is that they are threatening to remove it some time in the future.

The Web Browser control is supported by many programming languages and used for many different things on desktop apps. I can only imagine the outcry if MS removes it. At this time, I know of no alternative solutions for the desktop. Intranets, on the other hand, can always be modified or re-written to support new browsers.

I love and I hate Microsoft. They force (sometimes bully) developers into their way of thinking.

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Jeff Pace
  Nov 5, 2019 @ 08:43pm

IE 11 will go away as the standalone browser. Microsoft this week announced the Chromium based version of Edge (which I've been using for the last half a year or so) at Ignite, and it includes an Internet Explorer mode that can run all versions of IE internally. This means Microsoft will stop shipping Internet Explorer as a product in Windows 10 and instead rely on Edge to serve that purpose once it rolls it into the Operating System.

It doesn't mean that the IE engine goes away, because that's what they're using to render in IE mode in the new Edge. They basically swap out the browser engine using Chromium by default until you hit a site that has either an IE flag set in the headers or if explicitly requesting IE mode. I don't think this works yet in the current beta channel but it will soon. The new Edge is supposed to release to RTM in January, so we're not far off (it was announced about a year ago).

What all this means is that the ActiveX control will continue to be around - it isn't going away. All of IE is based on COM and those components are used all over Windows and Microsoft products. They can't kill it if they wanted to for breaking their own legacy products.

As to integrating the new shell - Microsoft showed a bunch of integration features for the new Chrome based browser, but it's only for C++ and .NET (and even the .NET stuff hasn't been released yet even in beta form). Chromium isn't COM based and the new API is completely different using a message based IPC style mechanism to pass message back and forth between browser and application. You basically have to proxy messages (via JSON) into the browser and then implement code on the other side to pick up those messages and do something with it. There's no direct COM based browser automation, and you sure can't pass FoxPro objects to the browser or DOM objects back from the browser.

This is a similar approach to other integrations like CEF which has .NET, ActiveX and a ton of other intergrations. I've played around with the ActiveX version of that some time ago but it was really unstable in FoxPro. I don't think there's going to be any hope of something like that running in FoxPro. The IE control is pretty wonky as it is if you're doing tight integration - anything else tends to just leak memory like crazy and eventually crash.

So - the good news is that IE ActiveX is likely to be around for a loooong time. The bad news is you can't easily do something more modern.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Jeff Pace
  Rick Strahl
  Nov 6, 2019 @ 06:48am

Dude, I knew you would be the one to best explain this issue - that's why I posted it here. I really appreciate you taking the time to run it down.

Jeff

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Martin Feresin
  Rick Strahl
  Feb 7, 2020 @ 10:49am

I would like to ask you a question. I was trying to implement WebkitX in an application that interacts with a web page by passing data and clicking on it, and so far I can't find the syntax to interact. I only managed to load the page and download the source code of it. I don't know if it serves as a replacement for IE webbrowser control, but it would be very good. If someone finds out how to use it, it would be a big step for all Visual Foxpro programmers who still cling to it. Thank you for so many years giving us help.

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Martin Feresin
  Feb 8, 2020 @ 01:18pm

I've tried most of the other ActiveX Web Browser controls and in FoxPro at least they don't work very well. They might work for simple stuff but for complex interaction in my scenarios they were either dreadfully slow, crashed or locked up the UI too much to be useful.

That said, the Web Browser IE control actually works pretty good since it supports HTML 5/CSS3 as long as you enable the modern rendering engine (by default it uses IE7).

I use it with Html Help Builder to power both the editor and the preview and it works well for that.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  MarshalR
  Rick Strahl
  May 23, 2021 @ 01:15am

What is the effect of Microsoft's May 21, 2021 announcement?

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  MarshalR
  May 23, 2021 @ 09:06am

Read the thread?

I've already answered this in one of the first replies.

Internet Explorer will be removed from Windows as an application. The WebBrowser COM engine will not be so any applications that use WebBrowser control will continue to work. There's no possible way that Microsoft could remove this as there are so many applications - both at Microsoft and in general - that rely on it both directly and indirectly. Not going to happen unless a much more serious shift in OS design happens (like going to some sort of managed language OS or Windows on non-x86).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Rick Strahl
  Jul 16, 2021 @ 02:24pm

Hi All,
Like others, I use the IE ActiveX Control in a VFP Form to access websites from within my VFP Desktop App. Today, a client called and said they are getting a warning from a vendor website that states: "Internet Explorer will not be supported beginning 08/01/2021 since Microsoft has discontinued support for the product".

I have the IE Emulation set to 11000, but I guess it's still IE of course. Is there any way around this if a vendor website doesn't support/allow IE browsers?

I pulled up the CEFSharp Modern Web Browser Video from FoxFest 2020 for review in case I need to go that route.

TIA,
Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Steve
  Jul 16, 2021 @ 03:00pm

No there's nothing that you can do about that if the vendor explicitly checks for IE functionality or behavior. You can tweak the user-agent I believe, but most sites these days that check use feature detection to find IE rather than the browser name string.

The bigger problem if you don't control your own content is that lots of newer sites start to break in IE. You can create reasonably complete HTML content if you control it that works with IE 11's HTML5/CSS3 support but if you go beyond that you're screwed and there's lots of content that's in that situation. For general browsing IE hasn't been a solution for a long time really.

The CEFSharp integration is not trivial - I looked at it briefly and decided against it in some of my apps. Too different, and too many technologies stacked on top of each other in an ActiveX control to be stable and very large for distribution. I think for anything beyond plain basic browsing it's going to cause stability problems.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Rick Strahl
  Jul 16, 2021 @ 05:48pm

Fortunately, this use case does not include general browsing. It's basically used to access a vendor website, upload a purchase order usually in the form of a text or csv file, and done.

Do you know of an alternative other than CEFSharp, other than moving off of VFP?

As always, thanks for your help!
Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Steve
  Jul 17, 2021 @ 11:11am

If your vendor site works with IE11 then there's nothing to fix or change. If not, then you do have a problem that has no easy solution.

I've been reluctant to use anything other than the Web Browser because of the complications and possible crash scenarios. The WebBrowser control is pretty stable, but other solutions not so much. The CefSharp implementation that Christof mentions looks complicated to implement and because of the stacked technologies sketchy for stability. There's also the Microsoft Edge WebView2 control, but there's no ActiveX wrapper and would need the same integration that CefSharp needs. I've used the WebView2 in Markdown Monster (a .NET application) and it works well there, but it too is very different and has a few quirks that would make it difficult to be used in FoxPro with complex document interactions.

As I've mentioned - if at all possible try making the WebBrowser control work. Other solutions will require a ton of rework and then there's no good track record to know how well it will work in terms of stability.

Good luck...

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Steve
  Jul 17, 2021 @ 11:19am

If your use case is as simple as you describe I wonder if it's necessary to use the WebBrowser control at all? Can you possibly automate this whole process just using HTTP commands using wwHttp or other Http client?

Another option that I've used for some use cases: Implement a separate form in .NET in an EXE to perform some task. That way you can use the WebView2 or CEFSharp in its native environment. You can then automate that with command line parameters and wait for the form to complete running.

I've used this approach in Html Help Builder for the built-in screen capture form. Basically HB calls out to this form (standalone exe) that performs the capture and then writes out a 'completion' file when it exits. HB picks up the completion file and retrieves the relevant result data or links (image locations in this case) and goes on. This allows for a semi-integrated experience that feels like it's part of the application even though it's not.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Rick Strahl
  Jul 17, 2021 @ 12:11pm

I was thinking of this exact scenario, maybe creating a simple .Net utility that performs the needed function, access the website, display the login page, etc... I found a video on embedding CEFSharp into a WPF Form today. Doesn't seem too bad, and is something to consider.

Unfortunately, I don't think using the wwHTTP client route will work. While users are basically just uploading a file, they still need to login, select import order, review the order, change it or add items if needed, and then click submit. Every vendor's website is a little different.

For uploading the PO's, I can simply call Google or Edge directly for that task if needed. This functionality doesn't really need to run in a VFP Form, and I usually don't unless the client is running under Terminal Services, where I want to tightly control access to the browser. There's really not much to it, and it's been fairly easy because of your great book and expertise!

However, I have other websites that I need to capture the HTML and parse out some of the info. This is where I am concerned, and where it's been nice to have the IE ActiveX Control in a VFP Form. So far, none of these vendors have stopped allowing IE, but I figure it's just a matter of time. Even Christof indicated that capturing the HTML using CEFSharp was difficult. So, I'm still trying to wrap my head around how to proceed. Did you have any luck with capturing HTML with CEFSharp?

Thanks for the feedback!
Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Steve
  Jul 17, 2021 @ 10:27pm

CEFSharp is a pain in many ways. Huge runtime you have to distribute.

I think the way to go today is using the new WebView2 control which is based on Microsoft's new Edge Chromium control. It has a smaller runtime that can be installed on demand and it's AFAICT a better performer.

I have a 2 part article series on this here:

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Rick Strahl
  Jul 18, 2021 @ 01:51pm

Thanks Rick for bringing those to my attention!

Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Michele
  Steve
  Feb 18, 2022 @ 09:03am

Since yesterday my google maps dont't works with ms web control.... they all works with other browsers, but not with IE. If i drag the page in IE i have script error and the message that this maps page is not supported by the browser.... Which option we have for insert in our foxpro form a web control ?

Thanks for suggets

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Rick Strahl
  Michele
  Feb 18, 2022 @ 12:15pm

No easy solutions for that.

Cristof had a SWFox session on embedding CEF into FoxPro, but it's horrendously complex.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Michele
  Steve
  Feb 19, 2022 @ 01:22am

Thanks

I found two commercial ActiveX products

https://www.webkitx.com/

https://webshop.antwise.com/home/10-antview-ms-edge-webview2-activex.html

Better the first, but it's licensing is absurd.... If you have terminal server installations you need a license of 6000 GBP for year and 600 GBP for a single developer license....

I'm testing the second where you need only to pay the developer license and it is royalty free

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Michele
  Feb 19, 2022 @ 06:14am

Hmmm, interesting you mention ActiveX. Last night, I remembered a White Paper I recently saw.

https://doughennig.com/papers/Pub/ActiveXControls.pdf

The above document talks about creating ActiveX Controls in .Net that can be used in VFP. I wonder if it's possible to use the above approach and adapt this to use the WebView2 control (or some other modern web browser variant) in our beloved VFP?

Thanks for mentioning the two ActiveX controls you found. I will take a look.

Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Michele
  Feb 19, 2022 @ 04:14pm

Looking at the 2nd option, AntView, for $300 to $400 bucks, I think it would be well worth the money. I have contacted them to inquire about the try-before-buy download. Thanks for the info!

Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Michele
  Steve
  Feb 20, 2022 @ 10:21am

Antview.ocx inserted in my app.... It's not perfect. You can have problems if you add it at design time.... I create a class on it and then i add it at runtime (with addobject) and it works fine.. It doesn't like anchor property... if you use it it is moved at the left top corner of the form.... I used Resize event...

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Steve
  Michele
  Feb 22, 2022 @ 09:46am

Thanks for the feedback. I typically have the IE ActiveX control cover most of the VFP Form, except for a small section across the top of the form where I place a few pushbuttons and labels. I have not heard back from them on the trial download. Are you using a Trial Version or did you purchase?

Thanks,
Steve

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Michele
  Steve
  Feb 22, 2022 @ 10:31am

I downloaded the trial version to test the control and then I bought the license for one developer...

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Diane Robitaille
  Michele
  Feb 22, 2022 @ 12:46pm

Hi Michelle, My clients have the same problem not being able to open google map since a few days. Thank you for your feed back I download AntView ActiveX demo version and I'm going to try it. For those interested, the download is here: https://antview.dev/downloads/

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Diane Robitaille
  Michele
  Feb 24, 2022 @ 07:32am

Hi Michele, Sorry to bug you with something trivial but I'm having trouble registering the license for AntView.ocx. Can you help? I tried:

oAntView = NEWOBJECT("AntView", "C:\Program Files (x86)\AntView\Win32\AntView.ocx")

And I get an error saying AntView is not a class.

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Michele
  Diane Robitaille
  Feb 24, 2022 @ 07:46am

You have to register the control with regsvr32 c:\program files (x86)\antview\win32\antview.ocx Then in Visual Foxpro you have to create class based on this control

Create Class antiview of test.vcx as olecontrol

(a form is opened where you have to select "AntView MS Edge WebView2 browser Control") Then you have to use this class in the desired form

In the tests i did, the best choice is to add the class at runtime and not drag it into the form....

ThisForm.AddObject("oBrowser","Tes.AntView")
With ThisForm.oBrowser
  .Top = 334
  .Left = 660
  .Width = 
  .Height= 
  .Visible = .T.
EndWith

and the navigate with

ThisForm.oBrowser.Navigate("http://www.west-wind.com")

Gravatar is a globally recognized avatar based on your email address. re: IE ActiveX going away?
  Diane Robitaille
  Michele
  Feb 24, 2022 @ 08:18am

Hi Michele, Thank you for your answer. My problem was with the UnlockControl() method to register the license key, first attempt, it didn't worked. I figure it out, I need to run VFP as administrator, then it worked.

To use AntView I did something similar to you; add AntView to TTT.vcx. Then I simply replaced _webbrowser4 with AntView in my googlemap class (drag and drop from TTT.vcx) and everything worked as before.

Googlemap is a class base on a form so when I need to display the map (a button in my customer's address form) I instantiate Googlemap as an object, I pass the GPS coordinate to a method "newUrl()" which call antview.navigate(...) and voilĂ ! Once instantiated, I keep the form's object open, personally I keep googlemap always visible but we could make it invisible/visible as needed if we wanted. Keeping the form open it goes way much faster the next time I send a new url. The draw back is the user see the map in a separate form but for us it's fine (customer's form is already crowded), and they can resize "Map" form as they wish. Have a great day and thank you again.

© 1996-2024